Ignore:
Timestamp:
Sep 30, 2007, 2:50:10 AM (16 years ago)
Author:
Peter
Message:

Sorry this commit is a bit to big.

Adding a yat_assert. The yat assert are turned on by providing a
'-DYAT_DEBUG' flag to preprocessor if normal cassert is turned
on. This flag is activated for developers running configure with
--enable-debug. The motivation is that we can use these yat_asserts in
header files and the yat_asserts will be invisible to the normal user
also if he uses C-asserts.

added output operator in DataLookup2D and removed output operator in
MatrixLookup?

Removed template function add_values in Averager and weighted version

Added function to AveragerWeighted? taking iterator to four ranges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/IteratorWeighted.h

    r909 r916  
    33
    44// $Id$
     5
     6#include "yat_assert.h"
    57
    68#include <iterator>
     
    4143       \return element
    4244     */
    43     return_type operator*(void) const { return container_->operator()(index_); }
     45    return_type operator*(void) const
     46    {
     47      yat_assert(index_<container_->size());
     48      return container_->operator()(index_);
     49    }
    4450
    4551    /**
    4652       \return data
    4753    */
    48     return_type data(void) const { return container_->data(index_); }
     54    return_type data(void) const
     55    { yat_assert(index_<container_->size()); return container_->data(index_); }
    4956
    5057    /**
    5158       \return weight
    5259    */
    53     return_type weight(void) const { return container_->weight(index_); }
     60    return_type weight(void) const
     61    { yat_assert(index_<container_->size());return container_->weight(index_); }
    5462
    5563
Note: See TracChangeset for help on using the changeset viewer.