Iterator over the indices contained in a FullGrid.
More...
#include <IndexVectorIterator.hpp>
|
size_t | getSequenceNumber () const |
|
double | getStandardCoordinate (size_t d, bool hasBoundary) |
| determines the coordinate of the current index in a given dimension "Standard" means no bounding box (i.e., the domain spanned by minIndex and maxIndex is the unit hypercube) and no stretching (i.e., the points have the standard locations \(i \cdot
2^{-\ell}\)).
|
|
void | getStandardCoordinates (sgpp::base::DataVector &coordinates, bool hasBoundary=true) |
| Sets the entries of DataVector coordinates to the coordinates of the gridpoint "Standard" means no bounding box (i.e., the domain spanned by minIndex and maxIndex is the unit hypercube) and no stretching (i.e., the points have the standard locations \(i \cdot
2^{-\ell}\)).
|
|
| IndexVectorIterator () |
| Default constructor, corresponds to the zero-dimensional case.
|
|
| IndexVectorIterator (const FullGrid &grid) |
| Constructor, sets the iterator to the first grid point in the full grid.
|
|
| IndexVectorIterator (const IndexVector &minIndex, const IndexVector &maxIndex) |
| Constructor, sets the iterator to the first grid point in the full grid.
|
|
| IndexVectorIterator (const IndexVectorIterator &)=default |
|
bool | isAtEnd () |
| check if iterator is at end of range – needed for swig interface
|
|
bool | operator!= (const IndexVectorIterator &other) const |
|
IndexVector & | operator* () |
|
IndexVectorIterator | operator+ (size_t rhs) const |
|
IndexVectorIterator & | operator++ () |
|
IndexVectorIterator | operator++ (int) |
|
IndexVectorIterator & | operator+= (size_t rhs) |
|
size_t | operator- (const IndexVectorIterator &other) const |
|
IndexVectorIterator | operator- (size_t rhs) const |
|
IndexVectorIterator & | operator-- () |
|
IndexVectorIterator | operator-- (int) |
|
IndexVectorIterator & | operator-= (size_t rhs) |
|
IndexVector * | operator-> () |
|
bool | operator< (const IndexVectorIterator &other) const |
|
bool | operator<= (const IndexVectorIterator &other) const |
|
IndexVectorIterator & | operator= (const IndexVectorIterator &)=default |
|
bool | operator== (const IndexVectorIterator &other) const |
|
bool | operator> (const IndexVectorIterator &other) const |
|
bool | operator>= (const IndexVectorIterator &other) const |
|
IndexVector & | operator[] (size_t rhs) |
|
void | setSequenceNumber (size_t sequenceNumber) |
|
Iterator over the indices contained in a FullGrid.
◆ IndexVectorIterator() [1/4]
sgpp::combigrid::IndexVectorIterator::IndexVectorIterator |
( |
| ) |
|
|
inline |
Default constructor, corresponds to the zero-dimensional case.
◆ IndexVectorIterator() [2/4]
sgpp::combigrid::IndexVectorIterator::IndexVectorIterator |
( |
const FullGrid & |
grid | ) |
|
|
inlineexplicit |
◆ IndexVectorIterator() [3/4]
sgpp::combigrid::IndexVectorIterator::IndexVectorIterator |
( |
const IndexVector & |
minIndex, |
|
|
const IndexVector & |
maxIndex |
|
) |
| |
|
inline |
Constructor, sets the iterator to the first grid point in the full grid.
- Parameters
-
minIndex | vector of minimum 1D indices |
maxIndex | vector of maximum 1D indices |
References dim, maxIndex, minIndex, and numberOfIndexVectors.
◆ IndexVectorIterator() [4/4]
◆ getSequenceNumber()
size_t sgpp::combigrid::IndexVectorIterator::getSequenceNumber |
( |
| ) |
const |
|
inline |
◆ getStandardCoordinate()
double sgpp::combigrid::IndexVectorIterator::getStandardCoordinate |
( |
size_t |
d, |
|
|
bool |
hasBoundary |
|
) |
| |
|
inline |
determines the coordinate of the current index in a given dimension "Standard" means no bounding box (i.e., the domain spanned by minIndex and maxIndex is the unit hypercube) and no stretching (i.e., the points have the standard locations \(i \cdot
2^{-\ell}\)).
- Parameters
-
d | the dimension in which the coordinate should be calculated |
hasBoundary | whether the grid has boundary points |
- Returns
- the coordinate in the given dimension
References maxIndex, minIndex, and operator*().
Referenced by getStandardCoordinates().
◆ getStandardCoordinates()
void sgpp::combigrid::IndexVectorIterator::getStandardCoordinates |
( |
sgpp::base::DataVector & |
coordinates, |
|
|
bool |
hasBoundary = true |
|
) |
| |
|
inline |
Sets the entries of DataVector coordinates to the coordinates of the gridpoint "Standard" means no bounding box (i.e., the domain spanned by minIndex and maxIndex is the unit hypercube) and no stretching (i.e., the points have the standard locations \(i \cdot
2^{-\ell}\)).
- Parameters
-
coordinates | the DataVector that should be overwritten with the coordinates |
hasBoundary | whether the grid has boundary points |
References dim, getStandardCoordinate(), and sgpp::base::DataVector::set().
◆ isAtEnd()
bool sgpp::combigrid::IndexVectorIterator::isAtEnd |
( |
| ) |
|
|
inline |
◆ operator!=()
bool sgpp::combigrid::IndexVectorIterator::operator!= |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether both instances are inequal (with respect to sequence numbers)
References sequenceNumber.
◆ operator*()
IndexVector & sgpp::combigrid::IndexVectorIterator::operator* |
( |
| ) |
|
|
inline |
◆ operator+()
- Parameters
-
- Returns
- copy of iterator increased by the right-hand side (increase of sequence number)
◆ operator++() [1/2]
- Returns
- iterator before incrementing (selecting the next index)
References sequenceNumber.
◆ operator++() [2/2]
- Returns
- iterator after incrementing (selecting the next index)
References sequenceNumber.
◆ operator+=()
- Parameters
-
- Returns
- iterator increased by the right-hand side (increase of sequence number)
References sequenceNumber.
◆ operator-() [1/2]
size_t sgpp::combigrid::IndexVectorIterator::operator- |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- difference between this iterator and other iterator (difference of sequence numbers)
References sequenceNumber.
◆ operator-() [2/2]
- Parameters
-
- Returns
- copy of iterator deccreased by the right-hand side (decrease of sequence number)
◆ operator--() [1/2]
- Returns
- iterator before decrementing (selecting the previous index)
References sequenceNumber.
◆ operator--() [2/2]
- Returns
- iterator after decrementing (selecting the previous index)
References sequenceNumber.
◆ operator-=()
- Parameters
-
- Returns
- iterator decreased by the right-hand side (decrease of sequence number)
References sequenceNumber.
◆ operator->()
IndexVector * sgpp::combigrid::IndexVectorIterator::operator-> |
( |
| ) |
|
|
inline |
◆ operator<()
bool sgpp::combigrid::IndexVectorIterator::operator< |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether this instance is smaller than the other instance (with respect to sequence numbers)
References sequenceNumber.
◆ operator<=()
bool sgpp::combigrid::IndexVectorIterator::operator<= |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether this instance is smaller than or equal to the other instance (with respect to sequence numbers)
References sequenceNumber.
◆ operator=()
◆ operator==()
bool sgpp::combigrid::IndexVectorIterator::operator== |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether both instances are equal (with respect to sequence numbers)
References sequenceNumber.
◆ operator>()
bool sgpp::combigrid::IndexVectorIterator::operator> |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether this instance is greater than the other instance (with respect to sequence numbers)
References sequenceNumber.
◆ operator>=()
bool sgpp::combigrid::IndexVectorIterator::operator>= |
( |
const IndexVectorIterator & |
other | ) |
const |
|
inline |
- Parameters
-
- Returns
- whether this instance is larger than or equal to the other instance (with respect to sequence numbers)
References sequenceNumber.
◆ operator[]()
IndexVector & sgpp::combigrid::IndexVectorIterator::operator[] |
( |
size_t |
rhs | ) |
|
|
inline |
◆ setSequenceNumber()
void sgpp::combigrid::IndexVectorIterator::setSequenceNumber |
( |
size_t |
sequenceNumber | ) |
|
|
inline |
◆ operator+
- Parameters
-
lhs | left-hand side |
rhs | right-hand side |
- Returns
- copy of right-hand side iterator increased by the left-hand side (increase of sequence number)
◆ dim
size_t sgpp::combigrid::IndexVectorIterator::dim |
|
protected |
dimensionality
Referenced by python.data.DataContainer.DataContainer::__init__(), python.uq.dists.EstimatedDist.EstimatedDist::_convertEvalPoint(), python.uq.dists.SGDEdist.SGDEdist::cdf(), python.uq.dists.KDEDist.KDEDist::cov(), python.uq.dists.SGDEdist.SGDEdist::cov(), python.data.DataContainer.DataContainer::getDataSubsetByIndexList(), python.data.DataContainer.DataContainer::getDim(), python.uq.dists.EstimatedDist.EstimatedDist::getDim(), python.uq.dists.LibAGFDist.LibAGFDist::getDim(), python.uq.dists.NatafDist.NatafDist::getDim(), getStandardCoordinates(), IndexVectorIterator(), isAtEnd(), operator[](), python.uq.dists.SGDEdist.SGDEdist::ppf(), python.uq.dists.EstimatedDist.EstimatedDist::rvs(), python.uq.dists.NatafDist.NatafDist::rvs(), python.uq.dists.KDEDist.KDEDist::rvs(), python.uq.dists.SGDEdist.SGDEdist::rvs(), python.uq.operations.natafTransformation.NatafTransformation::trans_X_to_Z(), and python.uq.operations.natafTransformation.NatafTransformation::trans_Z_to_X().
◆ indexVector
IndexVector sgpp::combigrid::IndexVectorIterator::indexVector |
|
protected |
temporary index vector, overwritten on read access
Referenced by operator[]().
◆ maxIndex
IndexVector sgpp::combigrid::IndexVectorIterator::maxIndex |
|
protected |
◆ minIndex
IndexVector sgpp::combigrid::IndexVectorIterator::minIndex |
|
protected |
◆ numberOfIndexVectors
IndexVector sgpp::combigrid::IndexVectorIterator::numberOfIndexVectors |
|
protected |
◆ sequenceNumber
size_t sgpp::combigrid::IndexVectorIterator::sequenceNumber |
|
protected |
current sequence number
Referenced by getSequenceNumber(), isAtEnd(), operator!=(), operator*(), operator++(), operator++(), operator+=(), operator-(), operator--(), operator--(), operator-=(), operator->(), operator<(), operator<=(), operator==(), operator>(), operator>=(), and setSequenceNumber().
The documentation for this class was generated from the following file: