MADNESS  0.10.1
Public Member Functions | Private Attributes | List of all members
madness::KeyChildIterator< NDIM > Class Template Reference

Iterates in lexical order thru all children of a key. More...

#include <key.h>

Collaboration diagram for madness::KeyChildIterator< NDIM >:
Collaboration graph
[legend]

Public Member Functions

 KeyChildIterator ()
 
 KeyChildIterator (const Key< NDIM > &parent)
 
const Key< NDIM > & key () const
 Returns the key of the child. More...
 
 operator bool () const
 True if iterator is not at end. More...
 
KeyChildIteratoroperator++ ()
 Pre-increment of an iterator (i.e., ++it) More...
 
template<typename Archive >
void serialize (Archive &ar)
 

Private Attributes

Key< NDIMchild
 
bool finished
 
Vector< Translation, NDIMp
 
Key< NDIMparent
 

Detailed Description

template<std::size_t NDIM>
class madness::KeyChildIterator< NDIM >

Iterates in lexical order thru all children of a key.

Example usage:

for (KeyChildIterator<NDIM> it(key); it; ++it) print(it.key());
Definition: test_tree.cc:78
const Key< NDIM > & key() const
Returns the key of the child.
Definition: key.h:425
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition: print.h:225

Constructor & Destructor Documentation

◆ KeyChildIterator() [1/2]

template<std::size_t NDIM>
madness::KeyChildIterator< NDIM >::KeyChildIterator ( )
inline

◆ KeyChildIterator() [2/2]

template<std::size_t NDIM>
madness::KeyChildIterator< NDIM >::KeyChildIterator ( const Key< NDIM > &  parent)
inline

Member Function Documentation

◆ key()

template<std::size_t NDIM>
const Key<NDIM>& madness::KeyChildIterator< NDIM >::key ( ) const
inline

Returns the key of the child.

References madness::KeyChildIterator< NDIM >::child.

◆ operator bool()

template<std::size_t NDIM>
madness::KeyChildIterator< NDIM >::operator bool ( ) const
inline

True if iterator is not at end.

References madness::KeyChildIterator< NDIM >::finished.

◆ operator++()

template<std::size_t NDIM>
KeyChildIterator& madness::KeyChildIterator< NDIM >::operator++ ( )
inline

◆ serialize()

template<std::size_t NDIM>
template<typename Archive >
void madness::KeyChildIterator< NDIM >::serialize ( Archive &  ar)
inline

Member Data Documentation

◆ child

template<std::size_t NDIM>
Key<NDIM> madness::KeyChildIterator< NDIM >::child
private

◆ finished

template<std::size_t NDIM>
bool madness::KeyChildIterator< NDIM >::finished
private

◆ p

template<std::size_t NDIM>
Vector<Translation, NDIM> madness::KeyChildIterator< NDIM >::p
private

◆ parent

template<std::size_t NDIM>
Key<NDIM> madness::KeyChildIterator< NDIM >::parent
private

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