SG++-Doxygen-Documentation
sgpp::base::HashGridIterator Class Reference

This class can be used for storage agnostic algorithms. More...

#include <HashGridIterator.hpp>

Public Types

typedef HashGridPoint::index_type index_t
index type More...

typedef HashGridPoint index_type
type of grid points More...

typedef HashGridPoint::level_type level_t
level type More...

Public Member Functions

void get (size_t d, index_type::level_type &l, index_type::index_type &i) const
Gets level l and index i in dimension d of the current grid point. More...

level_t getGridDepth (size_t dim)
Returns the the maximal level of the grid in the given dimension. More...

HashGridIterator (HashGridStorage &storage)
Constructor of the griditerator object. More...

HashGridIterator (HashGridIterator &copy)
Copy Constructor of the griditerator object. More...

bool hint () const
returns true if there are no more children in any dimension More...

bool hintLeft (size_t d)
returns true if there are more left children in dimension d More...

bool hintRight (size_t d)
returns true if there are more right children in dimension d More...

bool isInnerPoint () const
determines if the grid point is an inner grid point More...

void leftChild (size_t dim)
left child in direction dim More...

void push (size_t d, index_type::level_type l, index_type::index_type i)
Sets level l and index i in dimension d of the current grid point. More...

void resetToLeftLevelZero (size_t dim)
left level zero ansatz function for a given dimension More...

void resetToLevelOne (size_t d)
resets the iterator to the top if dimension d More...

void resetToLevelZero ()
Sets 0,0 in every dimension (Left Level zero ansatzfunction) More...

void resetToRightLevelZero (size_t dim)
right level zero ansatz function for a given dimension More...

void rightChild (size_t dim)
right child in direction dim More...

size_t seq () const
returns the current sequence number More...

void set (size_t d, index_type::level_type l, index_type::index_type i)
Sets level l and index i in dimension d of the current grid point. More...

void set (const index_type &point)
Sets the iterator to a grid point. More...

void stepLeft (size_t d)
step left in direction dim More...

void stepRight (size_t d)
step right in direction dim More...

std::string toString ()
Generates a string with level and index of the gridpoint. More...

void up (size_t d)
hierarchical parent in direction dim More...

~HashGridIterator ()
Destructor. More...

Detailed Description

This class can be used for storage agnostic algorithms.

GridPoint has to support: constructor, get, set, push, rehash

Member Typedef Documentation

index type

type of grid points

level type

Constructor & Destructor Documentation

 sgpp::base::HashGridIterator::HashGridIterator ( HashGridStorage & storage )
explicit

Constructor of the griditerator object.

Parameters
 storage reference to the hashmap that stores the grid points
 sgpp::base::HashGridIterator::HashGridIterator ( HashGridIterator & copy )
explicit

Copy Constructor of the griditerator object.

Parameters
 copy a HashGridIterator object that is used to build this instance
 sgpp::base::HashGridIterator::~HashGridIterator ( )

Destructor.

Member Function Documentation

 bool sgpp::base::HashGridIterator::hintLeft ( size_t d )

returns true if there are more left children in dimension d

Parameters
 d the moving direction
Returns
true if there are more left children in dimension d
 bool sgpp::base::HashGridIterator::hintRight ( size_t d )

returns true if there are more right children in dimension d

Parameters
 d the moving direction
Returns
true if there are more right children in dimension d
 bool sgpp::base::HashGridIterator::isInnerPoint ( ) const

determines if the grid point is an inner grid point

Returns
true if the grid point is an inner grid point

References sgpp::base::HashGridPoint::isInnerPoint().

 void sgpp::base::HashGridIterator::push ( size_t d, index_type::level_type l, index_type::index_type i )
inline

Sets level l and index i in dimension d of the current grid point.

Does not recompute hash value of the current grid point.

Parameters
 d the dimension of the gridpoint l the ansatz function's level i the ansatz function's index

References chess::dim, getGridDepth(), sgpp::base::HashGridPoint::push(), seq(), and toString().

 void sgpp::base::HashGridIterator::set ( size_t d, index_type::level_type l, index_type::index_type i )
inline

Sets level l and index i in dimension d of the current grid point.

Recomputes the hash value of the current grid point.

Parameters
 d the dimension of interest l the ansatz function's level i the ansatz function's index
 void sgpp::base::HashGridIterator::set ( const index_type & point )
inline

Sets the iterator to a grid point.

Recomputes the hash value of the current grid point.

Parameters
 point new grid point

References sgpp::base::HashGridStorage::getSequenceNumber(), and chess::point.

 void sgpp::base::HashGridIterator::stepLeft ( size_t d )

step left in direction dim

Parameters
 d the moving direction
 std::string sgpp::base::HashGridIterator::toString ( )

Generates a string with level and index of the gridpoint.

Returns
string into which the gridpoint is written

References sgpp::base::HashGridPoint::toString().

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