1 #ifndef BALL_LINALG_FORWARDITERATOR_H
2 #define BALL_LINALG_FORWARDITERATOR_H
4 #ifndef BALL_LINALG_BASEITERATOR_H
20 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
21 class ConstForwardIterator
22 :
public BaseIterator<Container, DataType, Position, Traits>
139 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
142 if (Base::isSingular())
144 Exception::SingularIterator e;
147 Base::getTraits().toBegin();
150 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
151 ConstForwardIterator<Container, DataType, Position, Traits>
154 ConstForwardIterator<Container, DataType, Position, Traits> iterator(container);
159 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
162 if (Base::getTraits().isSingular())
166 return Base::getTraits().isBegin();
169 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
172 if (Base::isSingular())
174 Exception::SingularIterator e;
177 Base::getTraits().toEnd();
180 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
181 ConstForwardIterator<Container, DataType, Position, Traits>
184 ConstForwardIterator iterator(container);
189 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
192 if (Base::isSingular())
196 return Base::getTraits().isEnd();
201 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
202 class ForwardIterator
203 :
public ConstForwardIterator<Container, DataType, Position, Traits>
317 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
318 ForwardIterator<Container, DataType, Position, Traits>
321 ForwardIterator iterator(container);
326 template <
typename Container,
typename DataType,
typename Position,
typename Traits>
327 ForwardIterator<Container, DataType, Position, Traits>
330 ForwardIterator iterator(container);
338 #endif // BALL_KERNEL_FORWARDITERATOR_H