- Timestamp:
- Mar 10, 2007, 8:59:51 PM (16 years ago)
- Location:
- trunk/yat/utility
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/matrix.cc
r780 r788 189 189 bool matrix::equal(const matrix& other, const double d) const 190 190 { 191 if (this==&other) 192 return true; 191 193 if (columns()!=other.columns() || rows()!=other.rows()) 192 194 return false; -
trunk/yat/utility/matrix.h
r776 r788 157 157 void div_elements(const matrix& b); 158 158 159 /// 160 /// Check whether matrices are equal within a user defined 161 /// precision, set by \a precision. 162 /// 163 /// @return True if each element deviates less or equal than \a 164 /// d. If any matrix contain a NaN, false is always returned. 165 /// 159 /** 160 \brief Check whether matrices are equal within a user defined 161 precision, set by \a precision. 162 163 \return True if each element deviates less or equal than \a 164 d. If any matrix contain a NaN, false is always returned. 165 166 \see operator== and operator!= 167 */ 166 168 bool equal(const matrix&, const double precision=0) const; 167 169 … … 289 291 const double& operator()(size_t row,size_t column) const; 290 292 291 /// 292 /// @brief Comparison operator. 293 /// 294 /// @return True if all elements are equal otherwise False. 295 /// 296 /// @see equal 297 /// 293 /** 294 \brief Comparison operator. Takes squared time. 295 296 Checks are performed with exact matching, i.e., rounding off 297 effects may destroy comparison. Use the equal function for 298 comparing elements within a user defined precision. 299 300 \return True if all elements are equal otherwise false. 301 302 \see equal 303 */ 298 304 bool operator==(const matrix& other) const; 299 305 300 /// 301 /// @brief Comparison operator. 302 /// 303 /// @return False if all elements are equal otherwise True. 304 /// 305 /// @see equal 306 /// 306 /** 307 \brief Comparison operator. Takes squared time. 308 309 Checks are performed with exact matching, i.e., rounding off 310 effects may destroy comparison. Use the equal function for 311 comparing elements within a user defined precision. 312 313 \return False if all elements are equal otherwise true. 314 315 \see equal 316 */ 307 317 bool operator!=(const matrix& other) const; 308 318
Note: See TracChangeset
for help on using the changeset viewer.