8 #error This class is not to be included by the user directly. Use RowIteratorf.h or RowIteratord.h instead.
12 class ROW_ITERATOR :
public std::iterator<std::random_access_iterator_tag, REAL>
35 _data_start = _current_data = NULL;
46 return *
this + (_sz - _count);
48 return *
this - (_count - _sz);
64 _current_data = _data_start + (_count / _columns) + (_count % _columns)*_ld;
82 _current_data = _data_start + (_count / _columns) + (_count % _columns)*_ld;
87 REAL& operator[](
int i)
const
92 throw std::runtime_error(
"Data outside of scope!");
93 return _data_start[(j / _columns) + (j % _columns)*_ld];
112 return _count < j._count;
117 return _count > j._count;
120 REAL& operator*()
const
122 if (_count < 0 || _count >= _sz)
123 throw std::runtime_error(
"Iterator outside of range!");
124 return *_current_data;
129 return _count - b._count;
135 assert(_data_start == b._data_start &&
139 _columns == b._columns);
141 return (_count == b._count);
144 bool operator!=(
const ROW_ITERATOR& j)
const {
return !operator==(j); }
149 assert(_columns > 0);
150 if (--_count % _columns == 0)
151 _current_data = _data_start + (_count / _columns);
153 _current_data -= _ld;
161 assert(_columns > 0);
162 if (++_count % _columns == 0)
163 _current_data = _data_start + (_count / _columns);
165 _current_data += _ld;
189 _current_data = i._current_data;
192 _data_start = i._data_start;
194 _columns = i._columns;
232 _data_start = _current_data = NULL;
243 _data_start = i._data_start;
244 _current_data = i._current_data;
249 _columns = i._columns;
256 return *
this + (_sz - _count);
258 return *
this - (_count - _sz);
274 _current_data = _data_start + (_count / _columns) + (_count % _columns)*_ld;
292 _current_data = _data_start + (_count / _columns) + (_count % _columns)*_ld;
297 const REAL& operator[](
int i)
const
300 if (j < 0 && j > _sz)
301 throw std::runtime_error(
"Data outside of scope!");
302 return _data_start[(j / _columns) + (j % _columns)*_ld];
321 return _count < j._count;
326 return _count > j._count;
329 const REAL& operator*()
const
331 if (_count >= _sz || _count < 0)
332 throw std::runtime_error(
"Iterator outside of range!");
333 return *_current_data;
338 return _count - b._count;
344 assert(_data_start == b._data_start &&
347 _columns == b._columns &&
350 return (_count == b._count);
358 assert(_columns > 0);
360 if (--_count % _columns == 0)
361 _current_data = _data_start + (_count / _columns);
363 _current_data -= _ld;
371 assert(_columns > 0);
373 if (++_count % _columns == 0)
374 _current_data = _data_start + (_count / _columns);
376 _current_data += _ld;
400 _current_data = i._current_data;
403 _data_start = i._data_start;
405 _columns = i._columns;
413 const REAL* _data_start;
414 const REAL* _current_data;
A construct for iterating over a rectangular block of a matrix.
Definition: RowIterator.h:210
A general 2x2 matrix.
Definition: Matrix2.h:16
A two-dimensional floating point vector used for computational geometry calculations and with associa...
Definition: Vector2.h:15
SACCEL operator-() const
Returns the negation of this vector.
Definition: SAccel.h:96
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
A generic N-dimensional floating point vector.
Definition: SharedVectorN.h:77
A generic, possibly non-square matrix using shared data.
Definition: SharedMatrixN.h:59
CONST_ROW_ITERATOR end() const
Gets the iterator at the end of this block.
Definition: RowIterator.h:253
A spatial velocity (a twist)
Definition: SVelocity.h:15
A generic N-dimensional floating point vector.
Definition: SharedVectorN.h:15
A 6-dimensional floating-point vector for use with spatial algebra.
Definition: SVector6.h:22
CONST_ROW_ITERATOR(ROW_ITERATOR i)
Converts a non-constant row iterator to a constant one.
Definition: RowIterator.h:241
A spatial (six dimensional) acceleration.
Definition: SAccel.h:14
A generic N-dimensional floating point vector.
Definition: VectorN.h:16
A three-dimensional floating point vector used for representing points and vectors in 3D with associa...
Definition: Vector3.h:15
A spatial force (a wrench)
Definition: SForce.h:14
A three-dimensional floating point vector used for representing points and vectors in 3D and without ...
Definition: Origin3.h:16
A generic, possibly non-square matrix using constant shared data.
Definition: SharedMatrixN.h:19
A two-dimensional floating point vector used for computational geometry calculations and without asso...
Definition: Origin2.h:14
A 3x3 matrix that may be used for orientation, inertia tensors, etc.
Definition: Matrix3.h:20
A construct for iterating over a rectangular block of a matrix.
Definition: RowIterator.h:12