NPL
Neurological Programs and Libraries
npl::FlatConstIter< T > Class Template Reference

Flat iterator iterator for NDArray. No information is kept about the current index. Just goes through all data. This casts the output to the type specified using T. More...

#include <iterators.h>

Public Member Functions

 FlatConstIter ()
 Default constructor. Note, this will segfault if you don't use setArray to set the target NDArray/Image. More...
 
 FlatConstIter (std::shared_ptr< const NDArray > in)
 
void setArray (ptr< const NDArray > in)
 
FlatConstIteroperator++ ()
 Prefix increment operator. More...
 
FlatConstIteroperator-- ()
 Prefix decrement operator. More...
 
operator* () const
 Dereference operator. More...
 
get () const
 Dereference operator. More...
 
void goBegin ()
 Go to beginning of iteration. More...
 
void goEnd ()
 Go to end of iteration. More...
 
bool isEnd () const
 Are we one past the last element? More...
 
bool eof () const
 Are we one past the last element? More...
 
bool isBegin () const
 Are we at the first element. More...
 
bool operator== (const FlatConstIter &other) const
 Whether the position and parent are the same as another. More...
 
bool operator!= (const FlatConstIter &other) const
 Whether the position and parent are different from another. More...
 
bool operator< (const FlatConstIter &other) const
 If the parents are different then false, if they are the same, returns whether this iterator is before the other. More...
 
bool operator> (const FlatConstIter &other) const
 If the parents are different then false, if they are the same, returns whether this iterator is after the other. More...
 
bool operator<= (const FlatConstIter &other) const
 If the parents are different then false, if they are the same, returns whether this iterator is the same or before the other. More...
 
bool operator>= (const FlatConstIter &other) const
 If the parents are different then false, if they are the same, returns whether this iterator is the same or after the other. More...
 

Detailed Description

template<typename T = double>
class npl::FlatConstIter< T >

Flat iterator iterator for NDArray. No information is kept about the current index. Just goes through all data. This casts the output to the type specified using T.

Template Parameters
T

Definition at line 345 of file iterators.h.

Constructor & Destructor Documentation

template<typename T = double>
npl::FlatConstIter< T >::FlatConstIter ( )
inline

Default constructor. Note, this will segfault if you don't use setArray to set the target NDArray/Image.

Definition at line 352 of file iterators.h.

template<typename T = double>
npl::FlatConstIter< T >::FlatConstIter ( std::shared_ptr< const NDArray in)
inline

Definition at line 354 of file iterators.h.

Member Function Documentation

template<typename T = double>
bool npl::FlatConstIter< T >::eof ( ) const
inline

Are we one past the last element?

Definition at line 486 of file iterators.h.

template<typename T = double>
T npl::FlatConstIter< T >::get ( ) const
inline

Dereference operator.

Returns
current value

Definition at line 460 of file iterators.h.

template<typename T = double>
void npl::FlatConstIter< T >::goBegin ( )
inline

Go to beginning of iteration.

Definition at line 471 of file iterators.h.

template<typename T = double>
void npl::FlatConstIter< T >::goEnd ( )
inline

Go to end of iteration.

Definition at line 476 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::isBegin ( ) const
inline

Are we at the first element.

Definition at line 491 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::isEnd ( ) const
inline

Are we one past the last element?

Definition at line 481 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator!= ( const FlatConstIter< T > &  other) const
inline

Whether the position and parent are different from another.

Parameters
other
Returns

Definition at line 512 of file iterators.h.

template<typename T = double>
T npl::FlatConstIter< T >::operator* ( ) const
inline

Dereference operator.

Returns
current value

Definition at line 447 of file iterators.h.

template<typename T = double>
FlatConstIter& npl::FlatConstIter< T >::operator++ ( )
inline

Prefix increment operator.

Returns
new value

Definition at line 425 of file iterators.h.

template<typename T = double>
FlatConstIter& npl::FlatConstIter< T >::operator-- ( )
inline

Prefix decrement operator.

Returns
new value

Definition at line 436 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator< ( const FlatConstIter< T > &  other) const
inline

If the parents are different then false, if they are the same, returns whether this iterator is before the other.

Parameters
other
Returns

Definition at line 525 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator<= ( const FlatConstIter< T > &  other) const
inline

If the parents are different then false, if they are the same, returns whether this iterator is the same or before the other.

Parameters
other
Returns

Definition at line 551 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator== ( const FlatConstIter< T > &  other) const
inline

Whether the position and parent are the same as another.

Parameters
other
Returns

Definition at line 500 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator> ( const FlatConstIter< T > &  other) const
inline

If the parents are different then false, if they are the same, returns whether this iterator is after the other.

Parameters
other
Returns

Definition at line 538 of file iterators.h.

template<typename T = double>
bool npl::FlatConstIter< T >::operator>= ( const FlatConstIter< T > &  other) const
inline

If the parents are different then false, if they are the same, returns whether this iterator is the same or after the other.

Parameters
other
Returns

Definition at line 564 of file iterators.h.

template<typename T = double>
void npl::FlatConstIter< T >::setArray ( ptr< const NDArray in)
inline

Definition at line 359 of file iterators.h.


The documentation for this class was generated from the following file: