GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | List of all members
OTreeNB< PType, DType >::iterator Class Reference

A iterator class that allows for movement through the tree without changing anything in the tree itself. More...

#include <oTreeNB.h>

Public Member Functions

 iterator (OTreeNB< PType > *tree)
 Sets the top or root to the top of "tree".
 
 iterator (Branch *branch)
 Sets the root to the input branch so that this will be a subtree in branch is not the real root.
 
iterator & operator= (iterator &it)
 
iterator & operator= (const Branch *branch)
 
Branch * operator* ()
 Returns a pointer to the current Branch.
 
bool up ()
 
bool down (short child)
 Move to child.
 
bool atTop () const
 
bool atLeaf () const
 
bool walk (bool allowDescent, iterator end)
 

Detailed Description

template<typename PType = Point_3d<PosType>, typename DType = PosType>
class OTreeNB< PType, DType >::iterator

A iterator class that allows for movement through the tree without changing anything in the tree itself.

Member Function Documentation

◆ walk()

template<typename PType = Point_3d<PosType>, typename DType = PosType>
bool OTreeNB< PType, DType >::iterator::walk ( bool  allowDescent,
iterator  end 
)
inline

walk the tree, returns false if the next step would be to move to the brother of the end iterator

end = tree.begin() if it is going to the end of the tree allowDescent = true if it is allowed to go down to the child , false if it should only go to the next brother


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