Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray > Class Template Reference

A one-dimensional linear array, i.e. More...

#include <CoordinateAxisArray.hpp>

Inheritance diagram for Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray >:
MemCore::Chunk< T > MemCore::TypedChunk< T > MemCore::result< MemBase >

Public Member Functions

 CoordinateAxisArray (index_t max_idx)
 CoordinateAxisArray (CoordinateAxisArray &Src)
 CoordinateAxisArray (const T &C0, const T &C1, index_t max_idx)
 Create a procedural array of equidistant values.
operator() (index_t i) const
 The element access function.
double reverse (const T &value) const
 Compute the floating point index that corresponds to the given coordinate value.
index_t Length () const
 Return the length of the array in terms of points covered.
Public Member Functions inherited from MemCore::Chunk< T >
const base_vector_type & base_vector () const override
base_vector_type & base_vector () override
 Chunk (const Filler &, const T &FillValue, size_t N=1)
 Chunk (const std::string &buffer)
 Chunk (const std::vector< T > &SourceValues)
 Chunk (size_t N, bool ReserveOnly=false)
T * operator() ()
Public Member Functions inherited from MemCore::TypedChunk< T >
std::vector< T > & get_vector ()
Public Member Functions inherited from MemCore::result< MemBase >
RefPtr< Domain > create (bool CreateAsOld=false)
RefPtr< Domain > createAsOld ()
 CreatorBase (const WCachePtr &theCache)
virtual RefPtr< Domain > get () const =0
RefPtr< Domain > get_or_request (const result &R=nullptr)
virtual const type_info & getType ()=0
bool isUnderCreation () const override
virtual bool request (const result &R=nullptr)
virtual RefPtr< Domain > take ()

Public Attributes

index_t length

Detailed Description

template<class T>
class Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray >

A one-dimensional linear array, i.e.

the coordinate expression is linear.

Constructor & Destructor Documentation

◆ CoordinateAxisArray()

template<class T>
Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray >::CoordinateAxisArray ( const T & C0,
const T & C1,
index_t max_idx )
inline

Create a procedural array of equidistant values.

To create an LinearArray<double> going from a=-3.4 to b=5.6 in a resolution of r=15 steps:

CoordinateAxisArray<double , LinearCoordinateAxisArray>
foo(a, (b-a)/(r-1), r);

References MemCore::Chunk< T >::Chunk().

Member Function Documentation

◆ Length()

template<class T>
index_t Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray >::Length ( ) const
inline

Return the length of the array in terms of points covered.

This is not the length in terms of data stored here.

◆ reverse()

template<class T>
double Fiber::CoordinateAxisArray< T, LinearCoordinateAxisArray >::reverse ( const T & value) const
inline

Compute the floating point index that corresponds to the given coordinate value.

If there is no delta, then always yield the 0th coordinate index.