Changeset 1064 for trunk/yat/utility/matrix.cc
 Timestamp:
 Feb 10, 2008, 11:06:52 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/utility/matrix.cc
r1028 r1064 160 160 161 161 162 matrix::iterator matrix::begin(void) 163 { 164 return iterator(&(*this)(0,0), 1); 165 } 166 167 168 matrix::const_iterator matrix::begin(void) const 169 { 170 return const_iterator(&(*this)(0,0), 1); 171 } 172 173 174 matrix::iterator matrix::begin_column(size_t i) 175 { 176 return iterator(&(*this)(0,i), this>columns()); 177 } 178 179 180 matrix::const_iterator matrix::begin_column(size_t i) const 181 { 182 return const_iterator(&(*this)(0,i), this>columns()); 183 } 184 185 186 matrix::iterator matrix::begin_row(size_t i) 187 { 188 return iterator(&(*this)(i,0), 1); 189 } 190 191 192 matrix::const_iterator matrix::begin_row(size_t i) const 193 { 194 return const_iterator(&(*this)(i,0), 1); 195 } 196 197 162 198 const matrix& matrix::clone(const matrix& other) 163 199 { … … 226 262 if (status) 227 263 throw utility::GSL_error(std::string("matrix::div_elements",status)); 264 } 265 266 267 matrix::iterator matrix::end(void) 268 { 269 return iterator(&(*this)(0,0)+rows()*columns(), 1); 270 } 271 272 273 matrix::const_iterator matrix::end(void) const 274 { 275 return const_iterator(&(*this)(0,0)+rows()*columns(), 1); 276 } 277 278 279 matrix::iterator matrix::end_column(size_t i) 280 { 281 return iterator(&(*this)(0,i)+rows()*columns(), this>columns()); 282 } 283 284 285 matrix::const_iterator matrix::end_column(size_t i) const 286 { 287 return const_iterator(&(*this)(0,i)+rows()*columns(), this>columns()); 288 } 289 290 291 matrix::iterator matrix::end_row(size_t i) 292 { 293 return iterator(&(*this)(i,0)+columns(), 1); 294 } 295 296 297 matrix::const_iterator matrix::end_row(size_t i) const 298 { 299 return const_iterator(&(*this)(i,0)+columns(), 1); 228 300 } 229 301
Note: See TracChangeset
for help on using the changeset viewer.