Changeset 343
- Timestamp:
- Jun 8, 2005, 12:00:28 AM (18 years ago)
- Location:
- trunk/lib/gslapi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/gslapi/vector.cc
r342 r343 194 194 195 195 196 vector& vector::operator=( const vector& other )196 const vector& vector::operator=( const vector& other ) 197 197 { 198 198 if( this != &other ) { -
trunk/lib/gslapi/vector.h
r342 r343 105 105 /// 106 106 // Jari, group as vector_operators 107 inline int 108 add_constant(double term) { return gsl_vector_add_constant(v_,term); } 107 inline int add(double term) { return gsl_vector_add_constant(v_,term); } 109 108 110 109 /// … … 312 311 vector operator*(const double d) const; 313 312 314 313 /// 315 314 /// Vector addition. 316 315 /// … … 319 318 vector operator+( const vector& other ) const; 320 319 321 320 /// 322 321 /// Vector subtraction. 323 322 /// … … 338 337 /// dimensions. 339 338 /// 340 vector& operator=(const vector&); 341 342 /// 339 /// @return A const reference to the resulting vector. 340 /// 341 const vector& operator=(const vector&); 342 343 /// 343 344 /// Addition and assign operator. 344 345 /// 345 /// @return The resulting vector.346 /// 347 inline vectoroperator+=( const vector& other )346 /// @return A const reference to the resulting vector. 347 /// 348 inline const vector& operator+=( const vector& other ) 348 349 { gsl_vector_add(v_,other.v_); return *this; } 349 350 350 351 /// 351 352 /// Subtract and assign operator. 352 353 /// 353 /// @return The resulting vector.354 /// 355 inline vectoroperator-=( const vector& other )354 /// @return A const reference to the resulting vector. 355 /// 356 inline const vector& operator-=( const vector& other ) 356 357 { gsl_vector_sub(v_,other.v_); return *this; } 357 358 … … 359 360 /// Multiply with scalar and assign operator. 360 361 /// 361 vector& operator*=(const double d) { gsl_vector_scale(v_,d); return *this; } 362 /// @return A const reference to the resulting vector. 363 /// 364 inline const vector& operator*=(const double d) 365 { gsl_vector_scale(v_,d); return *this; } 362 366 363 367
Note: See TracChangeset
for help on using the changeset viewer.