Changeset 1190
- Timestamp:
- Feb 29, 2008, 7:17:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/VectorMutable.cc
r1151 r1190 122 122 123 123 124 const VectorMutable& VectorMutable::operator+=(const VectorBase& other) 125 { 126 if (size()!=other.size()) 127 throw std::runtime_error("VectorMutable::operator+= size must be same."); 128 assert(vec_); 129 int status=gsl_vector_add(vec_, other.gsl_vector_p()); 130 if (status) 131 throw utility::GSL_error(std::string("VectorMutable::sub", status)); 132 return *this; 133 } 134 135 124 136 const VectorMutable& VectorMutable::operator+=(double d) 125 137 { … … 132 144 const VectorMutable& VectorMutable::operator-=(const VectorBase& other) 133 145 { 146 if (size()!=other.size()) 147 throw std::runtime_error("VectorMutable::operator-= size must be same."); 134 148 assert(vec_); 135 149 int status=gsl_vector_sub(vec_, other.gsl_vector_p());
Note: See TracChangeset
for help on using the changeset viewer.