|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
Multidimensional arrays are defined via recursive templates. More...
Classes | |
| class | Fiber::CreativeIterator< T > |
| An iterator with an optional DataCreator, which is just a class to intercept creation of data along a subset. More... | |
| struct | Fiber::FiniteDifferenceTrait< ResultType > |
| Type trait class to assign the partial derivative of some difference type to some result type. More... | |
| struct | Fiber::FiniteDifferenceTrait< double > |
| Special case of assigning partial derivatives of a scalar field to a one-dimensional result type, i.e. More... | |
| struct | Fiber::ComputePartialDerivative< EvalDimension > |
| Compute the partial derivative of a multidimensional array in the given index direction. More... | |
| class | Fiber::MultiArrayBase< N, T > |
| A generic multidimensional array is a one-dimensional pointer together with a specification of the extent in some dimensions. More... | |
| class | Fiber::MultiArrayBase< 1, T > |
| Stop the recursive definition of multidimensional arrays. More... | |
| class | Fiber::MultiArray< N, T, std::index_sequence< Is... > > |
| A multidimensional array for data that are stored via a native, writable C++ pointer. More... | |
| struct | Fiber::MultiArraySTLVector< N, T > |
| A multidimensional array for data that are stored in an STL vector<>. More... | |
| struct | Fiber::CreateFromLinear |
| A helper class to be used for multilinear index construction. More... | |
| class | Fiber::MultiIndex< Dims > |
| A recursively defined multidimensional index. More... | |
| class | Fiber::MultiIndex< 1 > |
| Stop multidimensional indexing recursion. More... | |
| class | Fiber::MultiOperate< Dims, MultidimensionalOperator, SkipDims > |
| Template class for multidimensional operations. More... | |
Functions | |
| template<Dims_t Dims, typename Value , typename ResultType > | |
| static MultiArray< Dims, ResultType > & | Fiber::ComputePartialDerivative< EvalDimension >::FiniteDifference (MultiArray< Dims, ResultType > &result, const MultiArray< Dims, Value > &ValueField) |
| Compute Finite Differences within a multidimensional array, putting the directional derivative along the index coordinates in the specified result array. | |
| template<Dims_t Dims, typename Value , typename ResultType > | |
| const MultiArray< Dims, ResultType > & | Fiber::ComputeDerivative (MultiArray< Dims, ResultType > &result, const MultiArray< Dims, Value > &ValueField) |
| Compute the derivative of a multidimensional array. | |
| template<class Dest , class Source , Dims_t N, class Converter > | |
| void | Fiber::Copy (MultiArray< N, Dest > &DestArray, const MultiArray< N, Source > &SrcArray, const Converter &C) |
| Copy data from the source array to the destination array, whereby the destination array must be larger than or equal to the source array. | |
| template<class Dest , class Source , Dims_t N, class Converter > | |
| void | Fiber::Copy (MultiArray< N, Dest > &DestArray, const MultiIndex< N > &DestOffset, const MultiArray< N, Source > &SrcArray, const Converter &C) |
| Copy data from the source array to the destination array, whereby the destination array must be larger than or equal to the source array. | |
| template<class Dest , class Source , Dims_t N, class Converter > | |
| void | Fiber::Copy (MultiArray< N, Dest > &DestArray, const MultiArray< N, Source > &SrcArray, const MultiIndex< N > &SrcOffset, const Converter &C) |
| Copy data from the source array to the destination array, whereby the destination array must be larger than or equal to the source array. | |
| template<class Dest , class Source , Dims_t N, class Converter > | |
| void | Fiber::Copy (MultiArray< N, Dest > &DestArray, const MultiIndex< N > &DestOffset, const MultiArray< N, Source > &SrcArray, const MultiIndex< N > &SrcOffset, const Converter &C) |
| Copy data from the source array to the destination array, whereby the destination array must be larger than or equal to the source array. | |
| template<class Dest , class Source , Dims_t N, class Converter > | |
| void | Fiber::CopySubset (const MultiIndex< N > &HowMany, MultiArray< N, Dest > &DestArray, const MultiIndex< N > &DestOffset, const MultiArray< N, Source > &SrcArray, const MultiIndex< N > &SrcOffset, const Converter &C) |
| Copy a subset of data from the source array to the destination array. | |
| template<Dims_t Dims> | |
| constexpr FixedArray< double, Dims > | div (const MultiIndex< Dims > &Divisor, const MultiIndex< Dims > &Dividend) |
| Compute the rational division of two MultiIndex es. | |
| template<class VectorType , class Domain , class scalar_t > | |
| 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. | |
| template<class VectorType , class Domain , class scalar_t > | |
| 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. | |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | operator+ (index_t C, const MultiIndex< Dims > &I) |
| Add constant plus multi-index. | |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | operator+ (const MultiIndex< Dims > &I, index_t C) |
| Add multi-index plus constant. | |
| template<Dims_t Dims> | |
| FixedArray< double, Dims > | operator* (const FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise multiplication. | |
| template<Dims_t Dims> | |
| FixedArray< double, Dims > | operator* (const MultiIndex< Dims > &I, const FixedArray< double, Dims > &a) |
| Component-wise multiplication. | |
| template<Dims_t Dims> | |
| FixedArray< double, Dims > | operator/ (const FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise division. | |
| template<Dims_t Dims> | |
| FixedArray< double, Dims > & | operator/= (FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise division. | |
| template<Dims_t Dims> | |
| FixedArray< double, Dims > & | operator*= (FixedArray< double, Dims > &a, const MultiIndex< Dims > &I) |
| Component-wise multiplication. | |
| template<Dims_t Dims> | |
| FixedArray< int, Dims > | MultiIndexToFixedArray (const MultiIndex< Dims > &Value) |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | FixedArrayToMultiIndex (const FixedArray< int, Dims > &Value) |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | minMultiIndex (const MultiIndex< Dims > &A, const MultiIndex< Dims > &B) |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | maxMultiIndex (const MultiIndex< Dims > &A, const MultiIndex< Dims > &B) |
Multidimensional arrays are defined via recursive templates.
Multi-valued homogeneous value types of constant size (e.g. float [4]) are supported transparently in different layouts. In this context, we call the value type the "fiber type". The fiber type may be a native scalar, such as float, double, int..., or e.g. constructed from a FixedArray<4,double>. Fiber types built from the FixedArray<> are specifically supported such that they may be stored in memory as separated compound ("XXXXXXYYYYYYZZZZZZ") as well as contiguous. ("XYZXYZXYZXYZXYZXYZ"). In both cases, the element access operate yields a reference to a XYZ variable. Also, in each layout a multidimensional array referring to only one component can be retrieved.
Subdimensional arrays (nD -> n-1 D) can be retrieved through the slice() function. The data are shared and the same memory layout as from the source array is sustained. At this occasion the subslice may also be created, e.g. procedurally or by loading data from disk or remotely.
|
related |
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.
|
related |
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.
| const MultiArray< Dims, ResultType > & Fiber::ComputeDerivative | ( | MultiArray< Dims, ResultType > & | result, |
| const MultiArray< Dims, Value > & | ValueField | ||
| ) |
Compute the derivative of a multidimensional array.
The result type needs to be able to store on difference type per dimension. The difference type is the type resulting from the minus operator applied on the Value type. This is not necessarily the same, for instance when we have an array of points. Then the difference type will not be a point again but a direction vector.
The template class FiniteDifferenceTrait defines specific access methods on how to assign the result of the derivation operation to the ResultType.
References Fiber::ComputePartialDerivative< EvalDimension >::compute().
Referenced by Fiber::Derivative< dT >::compute().