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

#include <vctDynamicNArrayBase.h>

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

Public Types

enum  { DIMENSION = OwnerType::DIMENSION }
 
typedef vctDynamicNArrayBase ThisType
 
typedef
vctDynamicConstNArrayBase
< _nArrayOwnerType,
_elementType, _dimension > 
BaseType
 
typedef _nArrayOwnerType OwnerType
 
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
BaseType::ConstSubarrayRefType 
ConstSubarrayRefType
 
typedef BaseType::SubarrayRefType SubarrayRefType
 
The type of the object representing a permutation of

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

typedef
BaseType::ConstPermutationRefType 
ConstPermutationRefType
 
typedef
BaseType::PermutationRefType 
PermutationRefType
 
The type of the object representing a slice of this

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

typedef BaseType::SlicesTypes SlicesTypes
 
typedef BaseType::ConstSliceRefType ConstSliceRefType
 
typedef BaseType::SliceRefType SliceRefType
 
- Public Types inherited from vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >
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
 
typedef OwnerType::iterator iterator
 
typedef OwnerType::const_iterator const_iterator
 
typedef OwnerType::reverse_iterator reverse_iterator
 
typedef
OwnerType::const_reverse_iterator 
const_reverse_iterator
 
typedef
vctDynamicConstNArrayRef
< value_type, DIMENSION
ConstSubarrayRefType
 
typedef vctDynamicNArrayRef
< value_type, DIMENSION
SubarrayRefType
 
typedef
vctDynamicConstNArrayRef
< value_type, DIMENSION
ConstPermutationRefType
 
typedef vctDynamicNArrayRef
< value_type, DIMENSION
PermutationRefType
 
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)
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
reverse_iterator rbegin (void)
 
const_reverse_iterator rbegin (void) const
 
reverse_iterator rend (void)
 
const_reverse_iterator rend (void) const
 
const OwnerTypeOwner (void) const
 
OwnerTypeOwner (void)
 
pointer Pointer (const nsize_type &indices)
 
const_pointer Pointer (const nsize_type &indices) const
 
pointer Pointer (void)
 
const_pointer Pointer (void) const
 
reference at (size_type metaIndex) throw (std::out_of_range)
 
const_reference at (size_type metaIndex) const throw (std::out_of_range)
 
reference at (const nsize_type &coordinates) throw (std::out_of_range)
 
const_reference at (const nsize_type &coordinates) const throw (std::out_of_range)
 
reference operator() (const nsize_type &coordinates) throw (std::out_of_range)
 
const_reference operator() (const nsize_type &coordinates) const throw (std::out_of_range)
 
reference Element (const nsize_type &coordinates)
 
const_reference Element (const nsize_type &coordinates) const
 
SubarrayRefType Subarray (const nsize_type &startPosition, const nsize_type &lengths)
 
ConstSubarrayRefType Subarray (const nsize_type &startPosition, const nsize_type &lengths) const
 
PermutationRefType Permutation (const ndimension_type &dimensions)
 
ConstPermutationRefType Permutation (const ndimension_type &dimensions) const
 
SliceRefType Slice (dimension_type dimension, size_type index) throw (std::runtime_error, std::out_of_range)
 
ConstSliceRefType Slice (dimension_type dimension, size_type index) const throw (std::runtime_error, std::out_of_range)
 
SliceRefType operator[] (size_type index)
 
ConstSliceRefType operator[] (size_type index) const
 
value_type SetAll (const value_type value)
 
bool Zeros (void)
 
ThisTypeAssign (const value_type *elements)
 
template<class __nArrayOwnerType , typename __elementType >
ThisTypeForceAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
template<class __nArrayOwnerType >
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeAddElementwiseProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
Assignment operation between arrays containing the same data type but different owners
Parameters
otherThe array to be copied.
template<class __nArrayOwnerType >
ThisTypeAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &other)
 
Assignment operation between nArrays of different types.
Parameters
otherThe nArray to be copied.
template<class __nArrayOwnerType , typename __elementType >
ThisTypeAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
template<class __nArrayOwnerType , typename __elementType >
ThisTypeoperator= (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
template<class __nArrayOwnerType >
bool FastCopyOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &source, bool performSafetyChecks=true) throw (std::runtime_error)
 
Binary elementwise operations between two nArrays.

Store the result of op(this, otherNArray) back to this nArray.

template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeSumOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeDifferenceOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeElementwiseProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeElementwiseRatioOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeElementwiseMinOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisTypeElementwiseMaxOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
template<class __nArrayOwnerType >
ThisTypeAdd (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeSubtract (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeElementwiseMultiply (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeElementwiseDivide (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeElementwiseMin (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeElementwiseMax (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeoperator+= (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeoperator-= (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
Binary elementwise operations an nArray and a scalar.

Store the result of op(nArray, scalar) to a third nArray.

template<class __nArrayOwnerType >
ThisTypeSumOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
template<class __nArrayOwnerType >
ThisTypeDifferenceOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
template<class __nArrayOwnerType >
ThisTypeProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
template<class __nArrayOwnerType >
ThisTypeRatioOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
template<class __nArrayOwnerType >
ThisTypeClippedAboveOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type lowerBound)
 
template<class __nArrayOwnerType >
ThisTypeClippedBelowOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type upperBound)
 
Binary elementwise operations a scalar and an nArray.

Store the result of op(scalar, nArray) to a third nArray.

template<class __nArrayOwnerType >
ThisTypeSumOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
template<class __nArrayOwnerType >
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
template<class __nArrayOwnerType >
ThisTypeProductOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
template<class __nArrayOwnerType >
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
template<class __nArrayOwnerType >
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
template<class __nArrayOwnerType >
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
Binary elementwise operations between an nArray and a scalar.

Store the result of op(this, scalar) back to this nArray.

ThisTypeAdd (const value_type scalar)
 
ThisTypeSubtract (const value_type scalar)
 
ThisTypeMultiply (const value_type scalar)
 
ThisTypeDivide (const value_type scalar)
 
ThisTypeClipAbove (const value_type upperBound)
 
ThisTypeClipBelow (const value_type lowerBound)
 
ThisTypeoperator+= (const value_type scalar)
 
ThisTypeoperator-= (const value_type scalar)
 
ThisTypeoperator*= (const value_type scalar)
 
ThisTypeoperator/= (const value_type scalar)
 
Unary elementwise operations.

Store the result of op(nArray) to another nArray.

template<class __nArrayOwnerType >
ThisTypeAbsOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeNegationOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeFloorOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
template<class __nArrayOwnerType >
ThisTypeCeilOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
Store back unary elementwise operations.

Store the result of op(this) to this nArray.

ThisTypeAbsSelf (void)
 
ThisTypeNegationSelf (void)
 
ThisTypeFloorSelf (void)
 
ThisTypeCeilSelf (void)
 
- Public Member Functions inherited from vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >
 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
 
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
 
bool IsCompact (void) const
 
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
 
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
 
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
 
NArrayReturnType Abs (void) const
 
NArrayReturnType Negation (void) const
 
NArrayReturnType Floor (void) const
 
NArrayReturnType Ceil (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >
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 inherited from vctDynamicConstNArrayBase< _nArrayOwnerType, _elementType, _dimension >
OwnerType NArray
 

Detailed Description

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

This class provides all the const methods inherited from vctDynamicConstNArrayBase, and extends them with non const methods, such as SumOf.

See Also
vctDynamicConstNArrayBase

Member Typedef Documentation

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

Type of the base class

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::const_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::const_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::const_reverse_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::const_reverse_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::ConstPermutationRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstPermutationRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::ConstSliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstSliceRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::ConstSubarrayRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ConstSubarrayRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef _nArrayOwnerType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::OwnerType

Type of the data owner (dynamic array or pointer)

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::PermutationRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::PermutationRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef OwnerType::reverse_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::reverse_iterator
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::SliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SliceRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::SlicesTypes vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SlicesTypes
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef BaseType::SubarrayRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SubarrayRefType
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
typedef vctDynamicNArrayBase vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ThisType

Type of the nArray itself

Member Enumeration Documentation

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

Member Function Documentation

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AbsOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
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 (AbsOf) or the opposite (NegationOf).

Parameters
otherNArrayThe operand of the unary operation.
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AbsSelf ( void  )
inline

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

Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Add ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline

Store back binary elementwise operations between two nArrays. For each element of the nArrays, performs $ this[i] \leftarrow op(this[i], otherNArray[i])$ where $op$ is either an addition (Add), a subtraction (Subtraction), a multiplication (ElementwiseMultiply) a division (ElementwiseDivide), a minimization (ElementwiseMin) or a maximisation (ElementwiseMax).

Parameters
otherNArrayThe second operand of the binary operation (this[i] is the first operand)
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Add ( const value_type  scalar)
inline

Store back binary elementwise operations between an nArray and a scalar. For each element of the nArray "this", performs $ this[i] \leftarrow op(this[i], scalar)$ where $op$ is either an addition (Add), a subtraction (Subtract), a multiplication (Multiply), a division (Divide), a minimum (ClipAbove) or a maximum (ClipBelow).

Parameters
scalarThe second operand of the binary operation (this[i] is the first operand).
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AddElementwiseProductOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::AddProductOf ( const value_type  scalar,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Assign ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  other)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType , typename __elementType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Assign ( const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &  other)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Assign ( const value_type *  elements)
inline

Assign to this nArray values from a C array given as a pointer to value_type. The purpose of this method is to simplify the syntax by not necessitating the creation of an explicit nArray for the given array. However, we only provide this method for an array of value_type. For arrays of other types an nArray still needs to be declared.

Parameters
elementsa pointer to a C array of elements to be assigned to this nArray
Note
This method assumes two things: (1) that the input array is packed, that is, that all the elements are stored in a contiguous memory block with no gaps; and (2) that the storage order of the input array matches the storage order of this nArray.
Returns
a reference to this object.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( size_type  metaIndex)
throw (std::out_of_range
)
inline

Access an element by index (non 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_reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( size_type  metaIndex) const
throw (std::out_of_range
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( const nsize_type &  coordinates)
throw (std::out_of_range
)
inline

Access an element by index. 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 reference to the element at indices
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::at ( const nsize_type &  coordinates) const
throw (std::out_of_range
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::begin ( void  )
inline

Returns an iterator on the first element (STL compatibility).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::begin ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::CeilOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::CeilSelf ( void  )
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClipAbove ( const value_type  upperBound)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClipBelow ( const value_type  lowerBound)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClippedAboveOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  lowerBound 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClippedAboveOf ( const value_type  upperBound,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClippedBelowOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  upperBound 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ClippedBelowOf ( const value_type  lowerBound,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::DifferenceOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::DifferenceOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  scalar 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::DifferenceOf ( const value_type  scalar,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Divide ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Element ( const nsize_type &  coordinates)
inline

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

Returns
a reference to the element at the specified indices
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Element ( const nsize_type &  coordinates) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseDivide ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseMax ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseMaxOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseMin ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseMinOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseMultiply ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseProductOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ElementwiseRatioOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::end ( void  )
inline

Returns an iterator on the last element (STL compatibility).

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::end ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
bool vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::FastCopyOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  source,
bool  performSafetyChecks = true 
)
throw (std::runtime_error
)
inline

Fast copy. This method uses memcpy whenever it is possible to perform a fast copy from another array to this array.

  • The method will first verify that the source and destination have the same sizes and throws an exception otherwise (std::runtime_error). See cmnThrow for details.
  • If any of the two narray is not compact or if the two narray use a different layout (different strides), this method will return false. If both narrays are compact and have the same strides, a memcpy is performed and the method returns true.
  • To avoid the tests above, one can set the parameter performSafetyChecks to false. This should be used only when the programmer knows for sure that the source and destination are compatible (sizes, strides and compactness).
  • As opposed to Assign, this method doesn't perform any type conversion.
  • Since no constructor is called for the contained elements, this function performs a "shallow copy". If the contained objects have a pointer as data member, the copied object will carry on the same pointer (hence pointing at the same memory block which could easily lead to bugs).

The basic and safe use of this method for an array would be:

if (!destination.FastCopyOf(source)) {
destination.Assign(source);
}

If the method is to be called many times (in a loop for example), it is recommended to check that the source and destination are compatible once and then use the option to turn off the different safety checks for each FastCopyOf.

bool canUseFastCopy = destination.FastCopyPossible(source);
for (index = 0; index < 1000; index++) {
DoSomethingUseful(source);
if (canUseFastCopy) {
destination.FastCopyOf(source, false); // Do not check again
} else {
destination.Assign(source);
}
}
Parameters
sourceNArray used to set the content of this array.
performSafetyChecksFlag set to false to avoid safety checks, use with extreme caution.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::FloorOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::FloorSelf ( void  )
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType , typename __elementType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ForceAssign ( const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &  other)
inline

Forced assignment operation between arrays of different types. This method will use SetSize on the destination array (this nArray) to make sure the assignment will work. It is important to note that if the sizes don't match, memory for this array will be re-allocated. If the program has previously created some references (as in vctDynamic{Const}NArrayRef) on this array, they will become invalid.

Note
For a non-reallocating Assign, it is recommended to use the Assign() methods.
If the destination array doesn't have the same size as the source and can not be resized, an exception will be thrown by the Assign method called internally.
Parameters
otherThe array to be copied.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Multiply ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NegationOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::NegationSelf ( void  )
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator() ( const nsize_type &  coordinates)
throw (std::out_of_range
)
inline

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

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reference vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator() ( const nsize_type &  coordinates) const
throw (std::out_of_range
)
inline

documented in base class

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator*= ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator+= ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator+= ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator-= ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator-= ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator/= ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType , typename __elementType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator= ( const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &  other)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
SliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator[] ( size_type  index)
inline

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

Returns
a non-const reference to the given index in the most significant dimension
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ConstSliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::operator[] ( size_type  index) const
inline

documented in base class

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const OwnerType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Owner ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
OwnerType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Owner ( void  )
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
PermutationRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Permutation ( const ndimension_type &  dimensions)
inline

Create a non-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>
ConstPermutationRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Permutation ( const ndimension_type &  dimensions) const
inline

documented in base class

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

Return a non 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>
const_pointer vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Pointer ( const nsize_type &  indices) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
pointer vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Pointer ( void  )
inline

Returns a non 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 vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Pointer ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ProductOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  scalar 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::ProductOf ( const value_type  scalar,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::RatioOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  scalar 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::RatioOf ( const value_type  scalar,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
reverse_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::rbegin ( void  )
inline

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

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

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

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
const_reverse_iterator vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::rend ( void  ) const
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
value_type vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SetAll ( const value_type  value)
inline

Assign the given value to all the elements.

Parameters
valuethe value used to set all the elements of the nArray
Returns
The value used to set all the elements
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
SliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Slice ( dimension_type  dimension,
size_type  index 
)
throw (std::runtime_error,
std::out_of_range
)
inline

Create a non-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>
ConstSliceRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Slice ( dimension_type  dimension,
size_type  index 
) const
throw (std::runtime_error,
std::out_of_range
)
inline

documented in base class

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

Create a non-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>
ConstSubarrayRefType vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Subarray ( const nsize_type &  startPosition,
const nsize_type &  lengths 
) const
inline

documented in base class

template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Subtract ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  otherNArray)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Subtract ( const value_type  scalar)
inline
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType1 , class __nArrayOwnerType2 >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SumOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &  nArray1,
const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &  nArray2 
)
inline

Binary elementwise operations between two nArrays. For each element of the nArrays, performs $ this[i] \leftarrow op(nArray1[i], nArray2[i])$ where $op$ is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ElementwiseProductOf), a division (ElementwiseRatioOf), a minimum (ElementwiseMinOf) or a maximum (ElementwiseMaxOf).

Parameters
nArray1The first operand of the binary operation
nArray2The second operand of the binary operation
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SumOf ( const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray,
const value_type  scalar 
)
inline

Binary elementwise operations between an nArray and a scalar. For each element of the nArray "this", performs $ this[i] \leftarrow op(nArray[i], scalar)$ where $op$ is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
nArrayThe first operand of the binary operation.
scalarThe second operand of the binary operation.
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
template<class __nArrayOwnerType >
ThisType& vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::SumOf ( const value_type  scalar,
const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &  nArray 
)
inline

Binary elementwise operations between a scalar and an nArray. For each element of the nArray "this", performs $ this[i] \leftarrow op(scalar, nArray[i])$ where $op$ is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
scalarThe first operand of the binary operation.
nArrayThe second operand of the binary operation.
Returns
The nArray "this" modified.
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType  )
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::VCT_NARRAY_TRAITS_TYPEDEFS ( _dimension  )
template<class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
bool vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::Zeros ( void  )
inline

Assign zero to all elements. This methods assumes that the element type has a zero and this zero value can be set using memset(0). If the nArray is not compact this method will use SetAll(0) and memset otherwise. This provides a slightly more efficent way to set all elements to zero.

Returns
true if the nArray is compact and memset was used, false otherwise.

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