Changeset 1789 for trunk/yat/utility/MatrixWeighted.cc
- Timestamp:
- Feb 10, 2009, 5:11:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/MatrixWeighted.cc
r1706 r1789 28 28 #include "DataIterator.h" 29 29 #include "Matrix.h" 30 #include "utility.h" 30 31 #include "WeightIterator.h" 31 32 … … 112 113 void MatrixWeighted::copy(const Matrix& data) 113 114 { 114 Matrix weight;115 nan(data, weight);116 copy(data, weight);117 }118 119 120 void MatrixWeighted::copy(const Matrix& data, const Matrix& weight)121 {122 assert(data.rows()==weight.rows());123 assert(data.columns()==weight.columns());124 115 columns_ = data.columns(); 125 116 resize(data.rows(), data.columns()); … … 127 118 assert(columns()==data.columns()); 128 119 std::copy(data.begin(), data.end(), data_iterator(vec_.begin())); 129 std::copy(weight.begin(), weight.end(), weight_iterator(vec_.begin()));120 BinaryWeight()(data.begin(), data.end(), weight_iterator(vec_.begin())); 130 121 } 131 122
Note: See TracChangeset
for help on using the changeset viewer.