Memory and data access interface for ltl::FVMemory. More...
Inherited by ltl::FVector< bool, NPAR >, ltl::FVector< double, N >, ltl::FVector< TPAR, NPAR >, and ltl::FVector< T, N, S >.
Memory and data access interface for ltl::FVMemory.
The ltl::FVMemory objects implement the memory access interface of the ltl::FVector object, i.e. operator() for 1-based access and operator[] for 0-based access. References N
objects of type T
accessible through a T*
with stride S
.
The template parameter S is the stride which may be != 1, such that column vectors of ltl::FVMatrix can be referenced as ltl::FVector objects.
There is a general implementation (this one) and a specialization for S=0. S!=0 indicates that this instance is a reference to foreign storage. S is then the stride used to access the memory elements. The specialization for S=0 below is used for instances that hold there own memory (i.e. ltl::FVector objects) that have their own memory, not references to other ltl::FVector objects. In this case the physical stride is one.
FVMemory
does not require more memory than is necessary to store the N elements of the vector if S=0. If S>0, the size is exactly sizeof(T*)
.
ltl::FVMemory< T, N, S >::FVMemory | ( | ) | [inline] |
ltl::FVMemory< T, N, S >::FVMemory | ( | T *const | data | ) | [inline] |
construct as a reference to the memory pointed to by data
.
T ltl::FVMemory< T, N, S >::operator[] | ( | const int | i | ) | const [inline] |
Access elements with zero-based index i
.
T& ltl::FVMemory< T, N, S >::operator[] | ( | const int | i | ) | [inline] |
Access elements with zero-based index i
.
T ltl::FVMemory< T, N, S >::operator() | ( | const int | i | ) | const [inline] |
Access elements with one-based index i
.
T& ltl::FVMemory< T, N, S >::operator() | ( | const int | i | ) | [inline] |
Access elements with one-based index i
.
T* ltl::FVMemory< T, N, S >::data | ( | ) | [inline] |
Return a pointer to the data.
T* ltl::FVMemory< T, N, S >::data | ( | ) | const [inline] |
Return a const pointer to the data.
T* ltl::FVMemory< T, N, S >::__data_ [protected] |
points to first element of data block for 0-based access
Referenced by ltl::FVMemory< T, N, 0 >::data(), ltl::FVMemory< double, N, 0 >::data(), ltl::FVMemory< T, N, 0 >::operator()(), ltl::FVMemory< double, N, 0 >::operator()(), ltl::FVMemory< T, N, 0 >::operator[](), and ltl::FVMemory< double, N, 0 >::operator[]().