Changeset 3169
- Timestamp:
- Jan 22, 2014, 8:41:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/Vector.cc
r2881 r3169 112 112 113 113 // convert the data to a gsl vector 114 vec_ = gsl_vector_alloc(nof_rows*nof_columns); 115 if (!vec_) 116 throw utility::GSL_error("Vector::Vector failed to allocate memory"); 114 vec_ = create_gsl_vector(nof_rows*nof_columns); 117 115 size_t n=0; 118 116 // if gsl error handler disabled, out of bounds index will not … … 166 164 if (!other.size()) 167 165 return NULL; 168 gsl_vector* vec = gsl_vector_alloc(other.size()); 169 if (!vec) 170 throw utility::GSL_error("Vector::create_gsl_vector_copy failed to allocate memory"); 166 gsl_vector* vec = create_gsl_vector(other.size()); 171 167 if (gsl_vector_memcpy(vec, other.gsl_vector_p())) 172 168 throw utility::GSL_error("Vector::create_gsl_vector_copy memcpy failed"); … … 181 177 gsl_vector* vec = gsl_vector_alloc(n); 182 178 if (!vec) 183 throw utility::GSL_error("Vector: :create_gsl_vectorfailed to allocate memory");179 throw utility::GSL_error("Vector: failed to allocate memory"); 184 180 return vec; 185 181 } … … 205 201 if (!n) 206 202 return; 207 const_vec_ = vec_ = gsl_vector_alloc(n); 208 if (!vec_) 209 throw utility::GSL_error("Vector::resize failed to allocate memory"); 203 const_vec_ = vec_ = create_gsl_vector(n); 210 204 all(init_value); 211 205 }
Note: See TracChangeset
for help on using the changeset viewer.