cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension > Class Template Reference

#include <vctDynamicConstNArrayBase.h>

Inheritance diagram for vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >:
vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension > vctDynamicNArrayBase< vctDynamicNArrayOwner< _elementType, _dimension >, _elementType, _dimension > vctDynamicNArray< _elementType, _dimension > vctReturnDynamicNArray< _elementType, _dimension >

Public Types

enum  { DIMENSION = OwnerType::DIMENSION }
 
typedef
vctDynamicConstNArrayBase
< _nArrayOwnerType,
_elementType, _dimension > 
ThisType
 
typedef _nArrayOwnerType OwnerType
 
typedef vctReturnDynamicNArray
< value_type, DIMENSION
NArrayValueType
 
typedef vctDynamicNArray
< value_type, DIMENSION
NArrayReturnType
 
typedef cmnTypeTraits< value_type > TypeTraits
 
typedef TypeTraits::BoolType BoolType
 
typedef vctReturnDynamicNArray
< BoolType, DIMENSION
BoolNArrayReturnType
 
Iterators on the elements of the nArray
typedef OwnerType::iterator iterator
 
typedef OwnerType::const_iterator const_iterator
 
typedef OwnerType::reverse_iterator reverse_iterator
 
typedef
OwnerType::const_reverse_iterator 
const_reverse_iterator
 
The type of the object representing a subarray of

this nArray. Access is by (const and non const) reference.

typedef
vctDynamicConstNArrayRef
< value_type, DIMENSION
ConstSubarrayRefType
 
typedef vctDynamicNArrayRef
< value_type, DIMENSION
SubarrayRefType
 
The type of the object representing a permutation of

this nArray. Access is by (const and non const) reference.

typedef
vctDynamicConstNArrayRef
< value_type, DIMENSION
ConstPermutationRefType
 
typedef vctDynamicNArrayRef
< value_type, DIMENSION
PermutationRefType
 
The type of the object representing a slice of this

nArray. Access is by (const and non const) reference.

typedef vctDynamicNArrayTypes
< DIMENSION >::template
SlicesTypes< _elementType > 
SlicesTypes
 
typedef
SlicesTypes::ConstSliceRefType 
ConstSliceRefType
 
typedef SlicesTypes::SliceRefType SliceRefType
 

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 
 VCT_NARRAY_TRAITS_TYPEDEFS (_dimension)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
const_reverse_iterator rbegin (void) const
 
const_reverse_iterator rend (void) const
 
size_type size (void) const
 
const nsize_type & sizes (void) const
 
size_type size (dimension_type dimension) const
 
const nstride_type & strides (void) const
 
difference_type stride (dimension_type dimension) const
 
dimension_type dimension (void) const
 
bool empty (void) const
 
bool ValidDimension (dimension_type dimension) const
 
bool ValidDimensionIndex (dimension_type dimensionIndex) const
 
bool ValidIndex (size_type index) const
 
bool ValidIndex (const nsize_type &indices) const
 
bool ValidIndex (dimension_type dimension, size_type index) const
 
const_reference at (size_type metaIndex) const throw (std::out_of_range)
 
const_reference at (const nsize_type &coordinates) const throw (std::out_of_range)
 
const_reference operator() (const nsize_type &coordinates) const throw (std::out_of_range)
 
const OwnerTypeOwner (void) const
 
const_pointer Pointer (void) const
 
const_pointer Pointer (const nsize_type &indices) const
 
const_reference Element (const nsize_type &coordinates) const
 
ConstSubarrayRefType Subarray (const nsize_type &startPosition, const nsize_type &lengths) const
 
ConstPermutationRefType Permutation (const ndimension_type &dimensions) const
 
ConstSliceRefType Slice (dimension_type dimension, size_type index) const throw (std::runtime_error, std::out_of_range)
 
ConstSliceRefType operator[] (size_type index) const
 
template<class __nArrayOwnerType >
bool FastCopyCompatible (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &source) const
 
std::string ToString (void)
 
void ToStream (std::ostream &outputStream) const
 
Incremental operations returning a scalar.

Compute a scalar from all the elements of the nArray.

value_type SumOfElements (void) const
 
value_type ProductOfElements (void) const
 
value_type NormSquare (void) const
 
NormType Norm (void) const
 
value_type L1Norm (void) const
 
value_type LinfNorm (void) const
 
value_type MaxElement (void) const
 
value_type MinElement (void) const
 
value_type MaxAbsElement (void) const
 
value_type MinAbsElement (void) const
 
void MinAndMaxElement (value_type &minElement, value_type &maxElement) const
 
bool IsPositive (void) const
 
bool IsNonNegative (void) const
 
bool IsNonPositive (void) const
 
bool IsNegative (void) const
 
bool All (void) const
 
bool Any (void) const
 
bool IsFinite (void) const
 
bool HasNaN (void) const
 
Storage format.
bool IsCompact (void) const
 
Elementwise comparisons between nArray.

Returns the result of the comparison.

template<class __nArrayOwnerType >
bool Equal (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool operator== (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool AlmostEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray, value_type tolerance) const
 
template<class __nArrayOwnerType >
bool AlmostEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool NotEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool operator!= (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool Lesser (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool LesserOrEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool Greater (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
bool GreaterOrEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
Elementwise comparisons between nArrays.

Returns the nArray of comparison's results.

template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseNotEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseLesser (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseLesserOrEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseGreater (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
template<class __nArrayOwnerType >
BoolNArrayReturnType ElementwiseGreaterOrEqual (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray) const
 
Elementwise comparisons between an nArray and a scalar.

Returns the result of the comparison.

bool Equal (const value_type &scalar) const
 
bool operator== (const value_type &scalar) const
 
bool NotEqual (const value_type &scalar) const
 
bool operator!= (const value_type &scalar) const
 
bool Lesser (const value_type &scalar) const
 
bool LesserOrEqual (const value_type &scalar) const
 
bool Greater (const value_type &scalar) const
 
bool GreaterOrEqual (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseEqual (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseNotEqual (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseLesser (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseLesserOrEqual (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseGreater (const value_type &scalar) const
 
BoolNArrayReturnType ElementwiseGreaterOrEqual (const value_type &scalar) const
 
Unary elementwise operations.

Returns the result of nArray.op().

NArrayReturnType Abs (void) const
 
NArrayReturnType Negation (void) const
 
NArrayReturnType Floor (void) const
 
NArrayReturnType Ceil (void) const
 

Protected Member Functions

void ThrowUnlessValidDimensionIndex (dimension_type dimensionIndex) const throw (std::out_of_range)
 
void ThrowUnlessValidIndex (size_type index) const throw (std::out_of_range)
 
void ThrowUnlessValidIndex (const nsize_type &indices) const throw (std::out_of_range)
 
void ThrowUnlessValidIndex (dimension_type dimension, size_type index) const throw (std::out_of_range)
 

Protected Attributes

OwnerType NArray
 

Detailed Description

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
class vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >

This class is templated with the ``nArray owner type'', which may be a vctDynamicNArrayOwner or a vctDynamicNArrayRefOwner. It provides const operations on the nArray, such as SumOfElements etc.

nArray indexing is zero-based.

nArray dimensions are zero-based.

The method provided for the compatibility with the STL containers start with a lower case. Other methods start with a capitalilized letter (see CISST naming convention).

Parameters
_nArrayOwnerTypethe type of nArray owner
_elementTypethe type of elements of the nArray

Member Typedef Documentation

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctReturnDynamicNArray<BoolType, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::BoolNArrayReturnType

The type of an nArray of booleans returned from operations on this object, e.g., ElementwiseEqual.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef TypeTraits::BoolType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::BoolType

Define bool based on the container type to force some compilers (i.e. gcc 4.0) to delay the instantiation of the ElementWiseCompare methods.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::const_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::const_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::const_reverse_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::const_reverse_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicConstNArrayRef<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstPermutationRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef SlicesTypes::ConstSliceRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstSliceRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicConstNArrayRef<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstSubarrayRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicNArray<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayReturnType

The type of nArray returned by value from operations on this object

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctReturnDynamicNArray<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayValueType

The type of nArray used to store by value results of the same type as this object.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef _nArrayOwnerType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::OwnerType

Type of the data owner (dynamic array or pointer)

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicNArrayRef<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::PermutationRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::reverse_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::reverse_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef SlicesTypes::SliceRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SliceRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicNArrayTypes<DIMENSION>::template SlicesTypes<_elementType> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SlicesTypes
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicNArrayRef<value_type, DIMENSION> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SubarrayRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicConstNArrayBase<_nArrayOwnerType, _elementType, _dimension> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThisType

Type of the nArray itself.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef cmnTypeTraits<value_type> vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::TypeTraits

Member Enumeration Documentation

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
anonymous enum
Enumerator
DIMENSION 

Member Function Documentation

template<class _nArrayOwnerType , class _elementType , vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Abs ( void  ) const
inline

Unary elementwise operations on an nArray. For each element of the nArray "this", performs $ this[i] \leftarrow op(otherNArray[i])$ where $op$ can calculate the absolute value (Abs) or the opposite (Negation).

Returns
A new nArray.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::All ( void  ) const
inline

Return true if all the elements of this nArray are nonzero, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AlmostEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray,
value_type  tolerance 
) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AlmostEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Any ( void  ) const
inline

Return true if any element of this nArray is nonzero, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( size_type  metaIndex) const
throw (std::out_of_range
)
inline

Access an element by index (const). Compare with std::matrix::at(). This method can be a handy substitute for the overloaded operator [] when operator overloading is unavailable or inconvenient.

Returns
a const reference to element[index]
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( const nsize_type &  coordinates) const
throw (std::out_of_range
)
inline

Access an element by indices (const). Compare with std::vector::at(). This method can be a handy substitute for the overloaded operator () when operator overloading is unavailable or inconvenient.

Returns
a const reference to the element at indices
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::begin ( void  ) const
inline

Returns a const iterator on the first element (STL compatibility).

template<class _nArrayOwnerType , class _elementType , vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Ceil ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
dimension_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::dimension ( void  ) const
inline

Not required by STL but provided for completeness

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Element ( const nsize_type &  coordinates) const
inline

Access an element by indices (const). This method allows to access an element without any bounds checking. It doesn't create any temporary references as nArray[][]...[] would do.

Returns
a reference to the element at the specified indices
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline

Comparison between two nArrays of the same size, containing the same type of elements. The strides and the internal representation (_nArrayOwnerType) can be different. The comparison ( $ = \neq < \leq > \geq $) for ElementwiseEqual(), ElementwiseNotEqual(), ElementwiseLesser(), ElementwiseLesserOrEqual(), ElementwiseGreater() or ElementwiseGreaterOrEqual() is performed elementwise between the two nArrays and stored in a newly created nArray. There is no operator provided since the semantic would be ambiguous.

Returns
An nArray of booleans.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseEqual ( const value_type &  scalar) const

Comparison between an nArray and a scalar, containing the same type of elements. The comparison ( $ = \neq < \leq > \geq $) for ElementwiseEqual(), ElementwiseNotEqual(), ElementwiseLesser(), ElementwiseLesserOrEqual(), ElementwiseGreater() or ElementwiseGreaterOrEqual() is performed elementwise between the nArray and the scalar and stored in a newly created nArray. There is no operator provided since the semantic would be ambiguous.

Returns
An nArray of booleans.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseGreater ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseGreater ( const value_type &  scalar) const
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseGreaterOrEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseGreaterOrEqual ( const value_type &  scalar) const
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseLesser ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseLesser ( const value_type &  scalar) const
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseLesserOrEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseLesserOrEqual ( const value_type &  scalar) const
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseNotEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
BoolNArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseNotEqual ( const value_type &  scalar) const
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::empty ( void  ) const
inline

Tell if the narray is empty (STL compatibility). False unless size is zero.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::end ( void  ) const
inline

Returns a const iterator on the last element (STL compatibility).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Equal ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline

Comparison between two nArray of the same size, containing the same type of elements. The strides can be different. The comparaison ( $ = \neq < \leq > \geq $) for Equal(), NotEqual(), Lesser(), LesserOrEqual(), Greater() or GreaterOrEqual() is performed elementwise between the two nArrays. A logical "and" is performed (except for NotEqual which uses a logical "or") to accumulate the elementwise results. The only operators provided are "==" and "!=" since the semantic is not ambiguous.

Returns
A boolean.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Equal ( const value_type &  scalar) const
inline

Comparison between an nArray and a scalar. The type of the elements of the nArray and the scalar must be the same. The comparison ( $ = \neq < \leq > \geq $) for Equal(), NotEqual(), Lesser(), LesserOrEqual(), Greater() or GreaterOrEqual() is performed elementwise between the nArray and the scalar. A logical "and" is performed (except for NotEqual which uses a logical "or") to accumulate the elementwise results. The only operators provided are "==" and "!=" since the semantic is not ambiguous.

Returns
A boolean.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::FastCopyCompatible ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  source) const
inline

Test if the method FastCopyOf can be used instead of Assign. See FastCopyOf for more details.

template<class _nArrayOwnerType , class _elementType , vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Floor ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Greater ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Greater ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::GreaterOrEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::GreaterOrEqual ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::HasNaN ( void  ) const
inline

Return true if any element of this nArray is NaN, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsCompact ( void  ) const
inline

Test if the nArray is compact, i.e. the nArray actually uses a contiguous block of memory.

Note
An empty nArray is considered compact
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsFinite ( void  ) const
inline

Return true if all the elements of this nArray are finite, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsNegative ( void  ) const
inline

Return true if all the elements of this nArray are strictly negative, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsNonNegative ( void  ) const
inline

Return true if all the elements of this nArray are non-negative, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsNonPositive ( void  ) const
inline

Return true if all the elements of this nArray are non-positive, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::IsPositive ( void  ) const
inline

Return true if all the elements of this nArray are strictly positive, false otherwise

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::L1Norm ( void  ) const
inline

Return the L1 norm of the nArray, i.e. the sum of the absolute values of all the elements.

Returns
The L1 norm.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Lesser ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Lesser ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::LesserOrEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::LesserOrEqual ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::LinfNorm ( void  ) const
inline

Return the Linf norm of the nArray, i.e. the maximum of the absolute values of all the elements.

Returns
The Linf norm.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::MaxAbsElement ( void  ) const
inline

Return the maximum of the absolute values of all the elements.

See Also
LinfNorm.
Returns
The maximum of the absolute values.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::MaxElement ( void  ) const
inline

Return the maximum element of the nArray.

Returns
The maximum element
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::MinAbsElement ( void  ) const
inline

Return the minimum of the absolute values of all the elements.

Returns
The minimum of the absolute values.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::MinAndMaxElement ( value_type &  minElement,
value_type &  maxElement 
) const
inline

Compute the minimum AND maximum elements of the nArray. This method is more runtime-efficient than computing them separately.

Parameters
minElementreference to store the minimum element result.
maxElementreference to store the maximum element result.
Note
If this nArray is empty (null pointer) the result is undefined.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::MinElement ( void  ) const
inline

Return the minimum element of the nArray.

Returns
The minimum element
template<class _nArrayOwnerType , class _elementType , vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArrayReturnType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Negation ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
NormType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Norm ( void  ) const
inline

Return the norm of the nArray.

Returns
The norm.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NormSquare ( void  ) const
inline

Return the square of the norm of the nArray.

Returns
The square of the norm
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NotEqual ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NotEqual ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator!= ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator!= ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator() ( const nsize_type &  coordinates) const
throw (std::out_of_range
)
inline

Overloaded operator () for simplified (const) element access with bounds checking

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator== ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator== ( const value_type &  scalar) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ConstSliceRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator[] ( size_type  index) const
inline

Reference an (n-1)-dimension slice of this nArray by index (const).

Returns
a const reference to the given index in the most significant dimension
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const OwnerType& vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Owner ( void  ) const
inline

Access the NArray owner. This method should be used only to access some extra information related to the memory layout. It is used by the engines (vctDynamicNArrayLoopEngines).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ConstPermutationRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Permutation ( const ndimension_type &  dimensions) const
inline

Create a const reference to this nArray with the strides permuted.

Parameters
dimensionsa sequence of dimension numbers representing the permuted order of strides
Note
Preserves the number of dimensions.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_pointer vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Pointer ( void  ) const
inline

Returns a const pointer to the first element of the container. Addition to the STL requirements.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_pointer vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Pointer ( const nsize_type &  indices) const
inline

Returns a const pointer to an element of the container, specified by its indices. Addition to the STL requirements.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ProductOfElements ( void  ) const
inline

Return the product of the elements of the nArray.

Returns
The product of all the elements
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reverse_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::rbegin ( void  ) const
inline

Returns a reverse const iterator on the last element (STL compatibility).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reverse_iterator vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::rend ( void  ) const
inline

Returns a reverse const iterator on the element before first (STL compatibility).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
size_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::size ( void  ) const
inline

Return the number of elements in the nArray. This is not equivalent to the difference between the end and the beginning.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
size_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::size ( dimension_type  dimension) const
inline

Not required by STL but provided for completeness

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const nsize_type& vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::sizes ( void  ) const
inline

Not required by STL but provided for completeness

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ConstSliceRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Slice ( dimension_type  dimension,
size_type  index 
) const
throw (std::runtime_error,
std::out_of_range
)
inline

Create a const reference to a slice of dimension n-1, where n is the dimension of this nArray.

Parameters
dimensionthe dimension number of the direction by which to reduce
slicethe index number in the dimension specified by which to set the reference
Note
The number of dimensions is reduced by one.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
difference_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::stride ( dimension_type  dimension) const
inline

Not required by STL but provided for completeness

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const nstride_type& vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::strides ( void  ) const
inline

Not required by STL but provided for completeness

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ConstSubarrayRefType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Subarray ( const nsize_type &  startPosition,
const nsize_type &  lengths 
) const
inline

Create a const reference to a subarray of this nArray.

Parameters
startPositionvector of indices of the element position where the reference will start
lengthsthe number of elements to reference in each dimension
Note
Preserves the number of dimensions.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SumOfElements ( void  ) const
inline

Return the sum of the elements of the nArray.

Returns
The sum of all the elements
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThrowUnlessValidDimensionIndex ( dimension_type  dimensionIndex) const
throw (std::out_of_range
)
inlineprotected

Check the validity of the given dimension index

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThrowUnlessValidIndex ( size_type  index) const
throw (std::out_of_range
)
inlineprotected

Check the validity of an index

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThrowUnlessValidIndex ( const nsize_type &  indices) const
throw (std::out_of_range
)
inlineprotected

Check the validity of the nArray indices

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThrowUnlessValidIndex ( dimension_type  dimension,
size_type  index 
) const
throw (std::out_of_range
)
inlineprotected

Check the validity of the given index in the (dimension)th-dimension

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
void vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ToStream ( std::ostream &  outputStream) const
inline

Print the nArray to a text stream

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
std::string vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ToString ( void  )
inline

Return a string representation of the nArray elements

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ValidDimension ( dimension_type  dimension) const
inline

Returns true if the given dimension value is equal to this nArray's dimension.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ValidDimensionIndex ( dimension_type  dimensionIndex) const
inline

Returns true if the given dimension index is valid.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ValidIndex ( size_type  index) const
inline

Returns true if the index is less than the number of elements of the nArray.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ValidIndex ( const nsize_type &  indices) const
inline

Returns true if all indices are valid indices.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ValidIndex ( dimension_type  dimension,
size_type  index 
) const
inline

Returns true if the given index is a valid index.

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType  )
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::VCT_NARRAY_TRAITS_TYPEDEFS ( _dimension  )

Member Data Documentation

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
OwnerType vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NArray
protected

Declaration of the nArray-defining member object


The documentation for this class was generated from the following files: