Playa::BlockIterator< Scalar > Class Template Reference

List of all members.

Public Member Functions

 BlockIterator ()
bool operator== (const BlockIterator< Scalar > &other) const
bool operator!= (const BlockIterator< Scalar > &other) const
bool operator< (const BlockIterator< Scalar > &other) const
BlockIterator< Scalar > operator++ (int)
const VectorSpace< Scalar > & space () const
std::ostream & print (std::ostream &os) const
const std::deque< int > & blockIndex () const
bool atEnd () const

Static Public Member Functions

static bool & debug ()

Protected Member Functions

void goToStart (const VectorSpace< Scalar > &space, std::deque< int > &pos) const
 BlockIterator (const VectorSpace< Scalar > &space, bool atEnd)
bool advance (int level)

Private Attributes

RCP< const VectorSpace< Scalar > > space_
std::deque< int > index_
bool atEnd_

Friends

class VectorSpaceBase< Scalar >
class VectorSpace< Scalar >
class Vector< Scalar >

Related Functions

(Note that these are not member functions.)

template<class Scalar >
std::ostream & operator<< (std::ostream &os, const Playa::BlockIterator< Scalar > &i)


Detailed Description

template<class Scalar>
class Playa::BlockIterator< Scalar >

BlockIterator can locate a block within an arbitrarily nested block vector space.

Definition at line 36 of file PlayaBlockIteratorDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Playa::BlockIterator< Scalar >::BlockIterator (  )  [inline]

Empty ctor

Definition at line 45 of file PlayaBlockIteratorDecl.hpp.

template<class Scalar >
Playa::BlockIterator< Scalar >::BlockIterator ( const VectorSpace< Scalar > &  space,
bool  atEnd 
) [inline, protected]

Constructor is private: the construction is always done inside the begin and end methods of vector space.

Definition at line 135 of file PlayaBlockIteratorImpl.hpp.

References Playa::BlockIterator< Scalar >::goToStart(), and Playa::BlockIterator< Scalar >::index_.


Member Function Documentation

template<class Scalar >
bool Playa::BlockIterator< Scalar >::advance ( int  level  )  [inline, protected]

Advance the index at the specified level. Return false if no further advance is possible

Definition at line 94 of file PlayaBlockIteratorImpl.hpp.

References Playa::BlockIterator< Scalar >::goToStart(), Playa::BlockIterator< Scalar >::index_, and Playa::BlockIterator< Scalar >::space().

Referenced by Playa::BlockIterator< Scalar >::operator++().

template<class Scalar>
bool Playa::BlockIterator< Scalar >::atEnd (  )  const [inline]

template<class Scalar>
const std::deque<int>& Playa::BlockIterator< Scalar >::blockIndex (  )  const [inline]

template<class Scalar>
static bool& Playa::BlockIterator< Scalar >::debug (  )  [inline, static]

Set to true (by doing BlockIterator<Scalar>::debug()=true) to trace the iterator

Definition at line 78 of file PlayaBlockIteratorDecl.hpp.

Referenced by Playa::BlockIterator< Scalar >::operator++().

template<class Scalar >
void Playa::BlockIterator< Scalar >::goToStart ( const VectorSpace< Scalar > &  space,
std::deque< int > &  pos 
) const [inline, protected]

Build an index pointing to the leftmost entry in the given block space

Definition at line 116 of file PlayaBlockIteratorImpl.hpp.

References Playa::VectorSpace< Scalar >::getBlock(), and Playa::VectorSpace< Scalar >::isBlockSpace().

Referenced by Playa::BlockIterator< Scalar >::advance(), and Playa::BlockIterator< Scalar >::BlockIterator().

template<class Scalar>
bool Playa::BlockIterator< Scalar >::operator!= ( const BlockIterator< Scalar > &  other  )  const [inline]

Compare two iterators

Definition at line 53 of file PlayaBlockIteratorDecl.hpp.

References Playa::BlockIterator< Scalar >::operator==().

template<class Scalar >
BlockIterator< Scalar > Playa::BlockIterator< Scalar >::operator++ ( int   )  [inline]

template<class Scalar >
bool Playa::BlockIterator< Scalar >::operator< ( const BlockIterator< Scalar > &  other  )  const [inline]

template<class Scalar >
bool Playa::BlockIterator< Scalar >::operator== ( const BlockIterator< Scalar > &  other  )  const [inline]

template<class Scalar >
std::ostream & Playa::BlockIterator< Scalar >::print ( std::ostream &  os  )  const [inline]

template<class Scalar >
const VectorSpace< Scalar > & Playa::BlockIterator< Scalar >::space (  )  const [inline]


Friends And Related Function Documentation

template<class Scalar >
std::ostream & operator<< ( std::ostream &  os,
const Playa::BlockIterator< Scalar > &  i 
) [related]

template<class Scalar>
friend class Vector< Scalar > [friend]

Definition at line 42 of file PlayaBlockIteratorDecl.hpp.

template<class Scalar>
friend class VectorSpace< Scalar > [friend]

Definition at line 41 of file PlayaBlockIteratorDecl.hpp.

template<class Scalar>
friend class VectorSpaceBase< Scalar > [friend]

Definition at line 40 of file PlayaBlockIteratorDecl.hpp.


Member Data Documentation

template<class Scalar>
bool Playa::BlockIterator< Scalar >::atEnd_ [private]

template<class Scalar>
std::deque<int> Playa::BlockIterator< Scalar >::index_ [private]

template<class Scalar>
RCP<const VectorSpace<Scalar> > Playa::BlockIterator< Scalar >::space_ [private]

Store the VC in an RCP so we can do forward declaration of VS

Definition at line 99 of file PlayaBlockIteratorDecl.hpp.

Referenced by Playa::BlockIterator< Scalar >::space().

Site Contact