Changeset 1193
- Timestamp:
- Feb 29, 2008, 8:48:45 PM (16 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup1D.cc
r1146 r1193 125 125 126 126 127 double DataLookup1D::operator[](const size_t i) const128 {129 return this->operator()(i);130 }131 132 133 127 double DataLookup1D::operator*(const DataLookup1D& other) const 134 128 { -
trunk/yat/classifier/DataLookup1D.h
r1170 r1193 121 121 122 122 /// 123 /// @brief access operator124 ///125 double operator[](const size_t i) const;126 127 ///128 123 /// scalar product 129 124 /// -
trunk/yat/classifier/DataLookupWeighted1D.cc
r1088 r1193 115 115 116 116 117 doubleDataLookupWeighted1D::operator()(const size_t i) const117 std::pair<double,double> DataLookupWeighted1D::operator()(const size_t i) const 118 118 { 119 119 return column_vector_ ? (*matrix_)(i,index_) : (*matrix_)(index_,i); … … 121 121 122 122 123 double DataLookupWeighted1D::operator[](const size_t i) const124 {125 return this->operator()(i);126 }127 128 123 }}} // of namespace classifier, yat, and theplu -
trunk/yat/classifier/DataLookupWeighted1D.h
r1111 r1193 112 112 /// @return data(i) * weight(i) 113 113 /// 114 double operator()(const size_t i) const; 115 116 /// 117 /// @return data(i) * weight(i) 118 /// 119 double operator[](const size_t i) const; 114 std::pair<double, double> operator()(const size_t i) const; 120 115 121 116 private: -
trunk/yat/classifier/MatrixLookupWeighted.cc
r1170 r1193 286 286 287 287 288 double MatrixLookupWeighted::operator()(const size_t row,289 288 std::pair<double, double> 289 MatrixLookupWeighted::operator()(const size_t row, const size_t column) const 290 290 { 291 return (weight(row,column) ? data(row,column)*weight(row,column) : 0);291 return std::make_pair(data(row, column), weight(row,column)); 292 292 } 293 293 -
trunk/yat/classifier/MatrixLookupWeighted.h
r1192 r1193 324 324 /// Access operator 325 325 /// 326 /// @return weight * data for element (@a row, @a column) 327 /// 328 double operator()(const size_t row, const size_t column) const; 326 /// @return data-weight pair (@a row, @a column) 327 /// 328 std::pair<double, double> 329 operator()(const size_t row, const size_t column) const; 329 330 330 331 ///
Note: See TracChangeset
for help on using the changeset viewer.