Changeset 1068
- Timestamp:
- Feb 11, 2008, 8:29:36 PM (15 years ago)
- Location:
- trunk/yat/utility
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/matrix.h
r1066 r1068 353 353 \brief Transpose the matrix. 354 354 355 \note Invalidates view of matrix, unless matrix is square. 356 355 357 \throw GSL_error if memory allocation fails for the new 356 358 transposed matrix. -
trunk/yat/utility/vector.cc
r1036 r1068 180 180 181 181 182 /* 183 //Peter use swap idiom 184 const VectorBase& vector::operator=( const VectorBase& other ) 185 { 186 if (!other.size()) 187 vec_=NULL; 188 else { 189 if (size()!=other.size()) 190 resize(other.size(),0.0); 191 gsl_vector_memcpy(vec_,other.gsl_vector_p()); 192 } 193 return *this; 182 const vector& vector::operator=( const VectorBase& other ) 183 { 184 return assign(other); 194 185 } 195 */ 186 196 187 197 188 const vector& vector::operator=( const vector& other ) … … 200 191 } 201 192 202 /*203 const VectorBase& vector::assign(VectorBase& other)204 {205 assign(other);206 }207 */208 193 209 194 const vector& vector::assign(const VectorBase& other) -
trunk/yat/utility/vector.h
r1058 r1068 118 118 \brief The assignment operator. 119 119 120 \note Invalidates views of vector. 121 120 122 \return A const reference to the resulting vector. 121 123 */ 122 //const VectorBase& operator=(const VectorBase&);123 124 const vector& operator=(const vector&); 125 126 /** 127 \brief The assignment operator. 128 129 \note Invalidates views of vector. 130 131 \return A const reference to the resulting vector. 132 */ 133 const vector& operator=(const VectorBase&); 124 134 125 135 private:
Note: See TracChangeset
for help on using the changeset viewer.