Changeset 1807


Ignore:
Timestamp:
Feb 18, 2009, 11:56:32 PM (13 years ago)
Author:
Peter
Message:

changed Functor BinaryWeight? to a function (algorithm) binary_weight

Location:
trunk/yat/utility
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Matrix.cc

    r1797 r1807  
    551551    if (templat.rows()!=flag.rows() || templat.columns()!=flag.columns())
    552552      flag.resize(templat.rows(),templat.columns(),1.0);
    553     return BinaryWeight()(templat.begin(), templat.end(), flag.begin());
     553    return binary_weight(templat.begin(), templat.end(), flag.begin());
    554554  }
    555555
  • trunk/yat/utility/MatrixWeighted.cc

    r1789 r1807  
    118118    assert(columns()==data.columns());
    119119    std::copy(data.begin(), data.end(), data_iterator(vec_.begin()));
    120     BinaryWeight()(data.begin(), data.end(), weight_iterator(vec_.begin()));
     120    binary_weight(data.begin(), data.end(), weight_iterator(vec_.begin()));
    121121  }
    122122
  • trunk/yat/utility/VectorBase.cc

    r1806 r1807  
    164164  {
    165165    flag.resize(templat.size());
    166     return BinaryWeight()(templat.begin(), templat.end(), flag.begin());
     166    return binary_weight(templat.begin(), templat.end(), flag.begin());
    167167  }
    168168
  • trunk/yat/utility/utility.h

    r1797 r1807  
    5151     1.0.
    5252
     53     \return true if there is at least one NaN in input range
     54     [first, last).
     55
    5356     \since New in yat 0.5
    54    */
    55   struct BinaryWeight
    56   {
    57     /**
    58         \return true if there is at least one NaN in input range
    59         [first, last).
    60      */
    61     template<typename InputIterator, typename OutputIterator>
    62     bool operator()(InputIterator first, InputIterator last,
    63                     OutputIterator result) const;
    64   };
     57  */
     58  template<typename InputIterator, typename OutputIterator>
     59  bool binary_weight(InputIterator first, InputIterator last,
     60                     OutputIterator result);
    6561
    6662
     
    119115
    120116  template<typename InputIterator, typename OutputIterator>
    121   bool BinaryWeight::operator()(InputIterator first, InputIterator last,
    122                                 OutputIterator result) const
     117  bool binary_weight(InputIterator first, InputIterator last,
     118                     OutputIterator result)
    123119  {
    124120    bool nan=false;
Note: See TracChangeset for help on using the changeset viewer.