Ignore:
Timestamp:
Sep 30, 2007, 2:50:10 AM (14 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/statistics/AveragerPairWeighted.h

    r915 r916  
    3030
    3131#include "yat/utility/IteratorTraits.h"
     32#include "yat/utility/yat_assert.h"
    3233
    3334#include <cmath>
     
    183184  void add(AveragerPairWeighted& ap, Iter1 first1, Iter1 last1, Iter2 first2)
    184185  {
    185     for ( ; first1 != last1; ++first1, ++first2)
     186    for ( ; first1 != last1; ++first1, ++first2) {
    186187      ap.add(utility::iterator_traits_data(first1),
    187188             utility::iterator_traits_data(first2),
    188189             utility::iterator_traits_weight(first1),
    189190             utility::iterator_traits_weight(first2));
     191    }
    190192  }
    191193
     
    197199                                         const T4& wy)
    198200  {
    199     for (size_t i=0; i<x.size(); i++)
     201    for (size_t i=0; i<x.size(); ++i){
     202      yat_assert(!std::isnan(x[i]));
    200203      add(x[i],y[i],wx[i],wy[i]);
     204    }
    201205  }
    202206
Note: See TracChangeset for help on using the changeset viewer.