|
Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
Stop multidimensional indexing recursion. More...
#include <MultiIndex.hpp>
Public Types | |
| enum | |
Public Member Functions | |
| constexpr | MultiIndex () noexcept |
| Default constructor. | |
| constexpr | MultiIndex (const Index &I) noexcept |
| Initialize highest index. | |
| constexpr | MultiIndex (const MultiIndex &Midx, const Index &I) noexcept |
| Multidimensional index as product of subdimension and index. | |
| constexpr | MultiIndex (const Index &lin_idx, const MultiIndex &Dimens, const CreateFromLinear &) |
| Multidimensional Index - a linear Index with Dimensions. | |
| MultiIndexIterator< 1 > | begin () const |
| Begin a ranged loop. | |
| MultiIndexIterator< 1 > | end () const |
| End a ranged loop. | |
| constexpr int | getSignedOrientation (const MultiIndex &B) const |
| constexpr const Index & | operator[] (int) const noexcept |
| constexpr Index & | operator[] (int) noexcept |
| constexpr const Index & | maxidx () const noexcept |
| constexpr Index & | maxidx () noexcept |
| constexpr Index | size () const noexcept |
| constexpr MultiIndex & | operator+= (const MultiIndex &D) noexcept |
| constexpr MultiIndex & | operator-= (const MultiIndex &D) noexcept |
| constexpr MultiIndex | operator+ (const MultiIndex &D) const noexcept |
| bool constexpr | operator== (const MultiIndex &D) const noexcept |
| bool constexpr | operator!= (const MultiIndex &D) const noexcept |
| inequality comparision operator | |
| bool | inc (const MultiIndex &Dimens, const MultiIndex &Increment) noexcept |
| bool | inc (const MultiIndex &Dimens) noexcept |
| Index constexpr | linear (const MultiIndex &) const |
| bool constexpr | isWithin (const MultiIndex &Range) const noexcept |
| index_t | Orientation () const noexcept |
| Given a MultiIndex that only contains one element of value 1, all others being zero (such as one created by the Axis() function), return the orientation that creates this. | |
| constexpr const MultiIndex< Dims-1 > & | subidx () const noexcept |
| Return associated constant dimensionator of one dimension less. | |
| Eagle::Assignment< MultiIndex, 0 > | operator= (const index_t &i) |
| Assignment via comma operator. | |
| bool | operator< (const MultiIndex &Range) const noexcept |
| Check if the current multiindex is smaller than the range. | |
| bool | operator> (const MultiIndex &Range) const noexcept |
| Check if the current multiindex is larger than the range. | |
| MultiIndex | operator- (const MultiIndex &D) const noexcept |
| Subtract multidimensional indices. | |
| MultiIndex | operator& (int i) const |
| Shortcut operator to compute the MultiIndex that is just one step aside in the direction as specified by the integer. | |
Static Public Member Functions | |
| static int | log2 (index_t N) noexcept |
| template<class Functor, Dims_t SuperDims> | |
| static bool | ForEachRecursion (Functor &F, const MultiIndex< SuperDims > &SuperIndex, const MultiIndex &Start, const MultiIndex &End, const MultiIndex &Increment) |
| static MultiIndex | BitIndex (unsigned int bits) noexcept |
| Multidimensional bit indices, that are zero or one in each of the directions as specified by the bits. | |
| static MultiIndex | Axis (unsigned int orientation) noexcept |
| Return a MultiIndex that points just in the given orientation. | |
| static bool | ForEach (Functor &F, const MultiIndex &Start, const MultiIndex &End, const MultiIndex &Increment=MultiIndex(1)) |
Protected Types | |
| using | Index = index_t |
| using | value_type = Index |
Protected Member Functions | |
| constexpr | MultiIndex (const MultiIndex &M, const MultiIndex &D, const Add &) noexcept |
| constexpr | MultiIndex (const MultiIndex &M, const MultiIndex &D, const Sub &) noexcept |
| constexpr | MultiIndex (const MultiIndex &M, const MultiIndex &D, const Mult &) noexcept |
| constexpr | MultiIndex (const MultiIndex &M, const MultiIndex &D, const Div &) noexcept |
| constexpr | MultiIndex (unsigned int bits, const ::Eagle::BinaryAnd &) noexcept |
| constexpr | MultiIndex (const MultiIndex &M, const MultiIndex &D, const ::Eagle::BinaryAnd &) noexcept |
| constexpr | MultiIndex (const MultiIndex &M, const Power2Alignment &) noexcept |
| constexpr | MultiIndex (const std::array< index_t, 1 > &A) |
Related Symbols | |
(Note that these are not member symbols.) | |
| constexpr FixedArray< double, Dims > | div (const MultiIndex< Dims > &Divisor, const MultiIndex< Dims > &Dividend) |
| Compute the rational division of two MultiIndex es. | |
| Eagle::DomainVector< VectorType, Domain, scalar_t > | CellSize (const Eagle::DomainVector< VectorType, Domain, scalar_t > &V, const MultiIndex< VectorType::SIZE > &Dividend, const MultiIndex< VectorType::SIZE > &Stride=MultiIndex< VectorType::SIZE >(1)) |
| Compute the size of a "cell" given a distance between a set of points. | |
| Eagle::DomainVector< VectorType, Domain, scalar_t > | CellSize0 (const Eagle::DomainVector< VectorType, Domain, scalar_t > &V, const MultiIndex< VectorType::SIZE > &Dividend, const MultiIndex< VectorType::SIZE > &Stride=MultiIndex< VectorType::SIZE >(1)) |
| Compute the size of a "cell" given a distance between a set of points. | |
| MultiIndex< Dims > | operator+ (index_t C, const MultiIndex< Dims > &I) |
| Add constant plus multi-index. | |
| MultiIndex< Dims > | operator+ (const MultiIndex< Dims > &I, index_t C) |
| Add multi-index plus constant. | |
| FixedArray< double, Dims > | operator* (const FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise multiplication. | |
| FixedArray< double, Dims > | operator* (const MultiIndex< Dims > &I, const FixedArray< double, Dims > &a) |
| Component-wise multiplication. | |
| FixedArray< double, Dims > | operator/ (const FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise division. | |
| FixedArray< double, Dims > & | operator/= (FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise division. | |
| FixedArray< double, Dims > & | operator*= (FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise multiplication. | |
| FixedArray< int, Dims > | MultiIndexToFixedArray (const MultiIndex< Dims > &Value) |
| MultiIndex< Dims > | FixedArrayToMultiIndex (const FixedArray< int, Dims > &Value) |
| MultiIndex< Dims > | minMultiIndex (const MultiIndex< Dims > &A, const MultiIndex< Dims > &B) |
| MultiIndex< Dims > | maxMultiIndex (const MultiIndex< Dims > &A, const MultiIndex< Dims > &B) |
Stop multidimensional indexing recursion.
|
inlineconstexpr |
Multidimensional Index - a linear Index with Dimensions.
It is ensured that the resulting index resides in the range of the dimensions.
|
inlinestaticnoexcept |
Return a MultiIndex that points just in the given orientation.
It is given by
with orientation < Dims . The inverse operation is the Orientation() member function.
|
inlinestaticnoexcept |
Multidimensional bit indices, that are zero or one in each of the directions as specified by the bits.
They can be used to compute the corners of an n-dimensional hypercube or the direction of the n-th axis.
|
inline |
Shortcut operator to compute the MultiIndex that is just one step aside in the direction as specified by the integer.
Adding 0 yields the original vector, adding +1 moves one element forward in the first axis, adding -1 moves one element backward along the first axis, etc. . The idea stems from Massimo Pierro's FermiQCD package.
|
inlinenoexcept |
Given a MultiIndex that only contains one element of value 1, all others being zero (such as one created by the Axis() function), return the orientation that creates this.
|
Compute the size of a "cell" given a distance between a set of points.
This size is the given distance vector divided by the number of points minus one, because there is one cell less than there are points. In case there is only one point, then the resulting "cell size" is just the vector itself, though "zero" would also be a valid answer here. This alternative answer is provided by the CellSize0() function.
The Stride parameter allows to generalize this function to compute the size of gaps spanning more than one point.
|
Compute the size of a "cell" given a distance between a set of points.
This size is the given distance vector divided by the number of points minus one, because there is one cell less than there are points. In case there is only one point, then the resulting "cell size" is zero, but "the input value" may also be a valid answer allowing to avoid divisions by zero in calling code. This alternative answer is provided by the CellSize() function.
The Stride parameter allows to generalize this function to compute the size of gaps spanning more than one point.