- Timestamp:
- Jan 6, 2007, 6:04:54 PM (16 years ago)
- Location:
- trunk/yat/utility
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/matrix.cc
r732 r734 359 359 360 360 361 const vector matrix::operator*(const vector&) const362 {363 std::cerr << "Not implemented:" << std::endl364 << " const vector matrix::operator*(const vector&) const"365 << std::endl;366 return vector(0);367 }368 369 370 361 bool matrix::operator==(const matrix& other) const 371 362 { -
trunk/yat/utility/utility.cc
r680 r734 4 4 Copyright (C) 2005 Jari Häkkinen, Markus Ringnér 5 5 Copyright (C) 2006 Jari Häkkinen 6 Copyright (C) 2007 Peter Johansson 6 7 7 8 This file is part of the yat library, http://lev.thep.lu.se/trac/yat … … 24 25 25 26 #include "utility.h" 27 28 #include "matrix.h" 26 29 #include "stl_utility.h" 27 30 #include "vector.h" … … 116 119 117 120 121 vector operator*(const matrix& m, const vector& v) 122 { 123 utility::vector res(m.rows()); 124 for (size_t i=0; i<res.size(); ++i) 125 res(i) = vector(m,i) * v; 126 return res; 127 } 128 129 130 vector operator*(const vector& v, const matrix& m) 131 { 132 utility::vector res(m.columns()); 133 for (size_t i=0; i<res.size(); ++i) 134 res(i) = v * vector(m,i,false); 135 return res; 136 } 137 118 138 }}} // end of namespace utility, yat and thep -
trunk/yat/utility/utility.h
r687 r734 7 7 Copyright (C) 2005 Jari Häkkinen, Peter Johansson, Markus Ringnér 8 8 Copyright (C) 2006 Jari Häkkinen 9 Copyright (C) 2007 Peter Johansson 9 10 10 11 This file is part of the yat library, http://lev.thep.lu.se/trac/yat … … 32 33 /// 33 34 35 #include "vector.h" 36 34 37 #include <string> 35 38 #include <utility> … … 40 43 namespace utility { 41 44 42 class vector;45 class matrix; 43 46 44 47 /// … … 82 85 void shuffle(vector& invec); 83 86 87 88 /** 89 @brief matrix vector multiplication 90 */ 91 vector operator*(const matrix&, const vector&); 92 93 94 /** 95 @brief matrix vector multiplication 96 */ 97 vector operator*(const vector&, const matrix&); 98 84 99 }}} // of namespace utility, yat, and theplu 85 100
Note: See TracChangeset
for help on using the changeset viewer.