The Fiber-Vector Library

The Fiber-Vector Library is a basic library which implements vector operations in a fiber space and operations on a regular base space.

It defines a generic class for constant-size arrays, i.e. homogeneous structures such as arrays of three floats, and allows to create large run-time determined multidimensional arrays of them (arrays of arrays). Hereby different memory layouts are supported. E.g. for a structure of type {XYZ}, the corresponding array may be {XXXYYYZZZ} or {XYZXYZXYZ}. In both case, an element of type {XYZ} is retrievable. This is important for memory-intensive data sets where re-ordering would be a major bottleneck. At the same time, a component projection is supported, i.e. the X-component of the above arrays can be treated as its own array without any memory copying (array views). These array classes also support creation of fractions on demand and thereby enable transparent access of datasets which are not entirely available in memory.

Finally, the library also enables interpolation of a data set on arbitrary points. Multiple interpolation schemes are possible. They may be defined recursively by specification of a one-dimensional scheme. Implemented are nearest neighbour, linear, fast cubic (cubic with zero derivative at interpolation points) and cubic interpolation schemes..

Vector operations are implemented with special attention to the vectorization features of Intel/AMD CPU's, i.e. their SIMD operations with SSE2/XMM/MMX support.

fVector Library Tutorial

Start with FiberInfo.cpp to find out how type traits help to describe basic types. Based on this type description, we may then build homogeneous array types which may be iterated generically, i.e. independent from their actual layout in memory.

File Assignment.cpp demonstrates how the comma operator is conveniently used to assign objects which are homogeneous multiples of an atomic type.

FixedArray.cpp describes how the FixedArray template is used to construct constant-sized homogeneous structures.

Vector.cpp demonstrates vector space operations.

VVector.cpp demontrates vectorized vector space operations; they are up to 4x faster, but require the respective objects to be aligned. This is done automatically when using VVector types and the result looks same as using Vector's.

Matrix.cpp simple matrix operations.

QuadraticMatrix.cpp is about quadratic matrizes and their relationships.

EigenVector.cpp shows computing eigenvalues.

Iterator.cpp tells how to iterate over sets of single-valued values or arrays of vectors.

Operator.cpp demonstrates global operations on arrays.

MultiArray.cpp demonstrates multidimensional arrays.