Public Member Functions | Protected Member Functions

Fiber::DynamicSize Class Reference
[Interfacing the Vector library with the MemCore library.]

A class describing an n-dimensional space at runtime. More...

#include <DynamicSize.hpp>

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

A class describing an n-dimensional space at runtime.

This class complements the MultiIndex<N> template classes which have their dimensionality fixed at compile-time. The DynamicSize class may be used for generic operations on arbitrary, runtime-determined dimensions. However, for high performance usually the compile-time MultiIndex<N> classes should be used. Conversion functions are provided, but must be used with care (check return values!).


Member Function Documentation

const index_t* Fiber::DynamicSize::dims_ptr (  )  const [inline]

Return c pointer to dimension storage.

Don't use this function. C pointers are evil.

template<int N>
bool Fiber::DynamicSize::get ( MultiIndex< N > &  MI  )  const [inline]

Retrieve a dynamic size into a multidimensional index.

Returns:
false if the dimensions don't match
index_t Fiber::DynamicSize::operator[] ( int  i  )  const [inline]

Element access operator.

Returns zero if no dimensions have been defined at all, or 1 if the coordinate range is beyond the defined dimensionality.

bool Fiber::DynamicSize::setSize ( int  i,
index_t  what 
) [inline]

Set the extension of this dimensional size in a certain dimension.

Returns:
false if anything went wrong, such as illegal dimension specified.