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

#include <vctDynamicNArray.h>

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

Public Types

typedef vctDynamicNArray
< _elementType, _dimension > 
BaseType
 
- Public Types inherited from vctDynamicNArray< _elementType, _dimension >
typedef vctDynamicNArrayBase
< vctDynamicNArrayOwner
< _elementType, _dimension >
, _elementType, _dimension > 
BaseType
 
typedef vctDynamicNArray
< _elementType, _dimension > 
ThisType
 
- Public Types inherited from vctDynamicNArrayBase< vctDynamicNArrayOwner< _elementType, _dimension >, _elementType, _dimension >
enum  
 
typedef vctDynamicNArrayBase ThisType
 
typedef
vctDynamicConstNArrayBase
< vctDynamicNArrayOwner
< _elementType, _dimension >
, _elementType, _dimension > 
BaseType
 
typedef vctDynamicNArrayOwner
< _elementType, _dimension > 
OwnerType
 
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
BaseType::ConstSubarrayRefType 
ConstSubarrayRefType
 
typedef BaseType::SubarrayRefType SubarrayRefType
 
typedef
BaseType::ConstPermutationRefType 
ConstPermutationRefType
 
typedef
BaseType::PermutationRefType 
PermutationRefType
 
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)
 
 vctReturnDynamicNArray (const BaseType &other)
 
- Public Member Functions inherited from vctDynamicNArray< _elementType, _dimension >
 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 
 VCT_NARRAY_TRAITS_TYPEDEFS (_dimension)
 
 vctDynamicNArray ()
 
 vctDynamicNArray (const nsize_type &sizes)
 
 vctDynamicNArray (const nsize_type &sizes, value_type value)
 
 vctDynamicNArray (const vctReturnDynamicNArray< value_type, _dimension > &otherNArray)
 
template<class _otherNArrayOwnerType , typename _otherNArrayElementType >
 vctDynamicNArray (const vctDynamicConstNArrayBase< _otherNArrayOwnerType, _otherNArrayElementType, _dimension > &otherNArray)
 
template<class __nArrayOwnerType , typename __elementType >
ThisTypeoperator= (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, _dimension > &otherNArray)
 
ThisTypeoperator= (const ThisType &otherNArray)
 
ThisTypeoperator= (const vctReturnDynamicNArray< value_type, _dimension > &otherNArray)
 
ThisTypeoperator= (const value_type &value)
 
template<class __nArrayOwnerType , typename __elementType >
ThisTypeForceAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, _dimension > &other)
 
template<class _elementType , vct::size_type _dimension>
 vctDynamicNArray (const vctReturnDynamicNArray< _elementType, _dimension > &other)
 
template<class _elementType , vct::size_type _dimension>
vctDynamicNArray< _elementType,
_dimension > & 
operator= (const vctReturnDynamicNArray< _elementType, _dimension > &other)
 
 vctDynamicNArray (const ThisType &otherNArray)
 
template<class _otherNArrayOwnerType >
 vctDynamicNArray (const vctDynamicConstNArrayBase< _otherNArrayOwnerType, value_type, _dimension > &otherNArray)
 
void SetSize (const nsize_type &sizes)
 
- Public Member Functions inherited from vctDynamicNArrayBase< vctDynamicNArrayOwner< _elementType, _dimension >, _elementType, _dimension >
 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)
 
ThisTypeForceAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeAddElementwiseProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &other)
 
ThisTypeAssign (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
ThisTypeoperator= (const vctDynamicConstNArrayBase< __nArrayOwnerType, __elementType, DIMENSION > &other)
 
bool FastCopyOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &source, bool performSafetyChecks=true) throw (std::runtime_error)
 
ThisTypeSumOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeDifferenceOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeElementwiseProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeElementwiseRatioOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeElementwiseMinOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeElementwiseMaxOf (const vctDynamicConstNArrayBase< __nArrayOwnerType1, value_type, DIMENSION > &nArray1, const vctDynamicConstNArrayBase< __nArrayOwnerType2, value_type, DIMENSION > &nArray2)
 
ThisTypeAdd (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeSubtract (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeElementwiseMultiply (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeElementwiseDivide (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeElementwiseMin (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeElementwiseMax (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeoperator+= (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeoperator-= (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeSumOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
ThisTypeDifferenceOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
ThisTypeProductOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
ThisTypeRatioOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type scalar)
 
ThisTypeClippedAboveOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type lowerBound)
 
ThisTypeClippedBelowOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray, const value_type upperBound)
 
ThisTypeSumOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeProductOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &nArray)
 
ThisTypeAdd (const value_type scalar)
 
ThisTypeSubtract (const value_type scalar)
 
ThisTypeoperator+= (const value_type scalar)
 
ThisTypeoperator-= (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)
 
ThisTypeAbsOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeNegationOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeFloorOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
ThisTypeCeilOf (const vctDynamicConstNArrayBase< __nArrayOwnerType, value_type, DIMENSION > &otherNArray)
 
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 _elementType, vct::size_type _dimension>
class vctReturnDynamicNArray< _elementType, _dimension >

Class vctReturnDynamicNArray is specialized to store a temporary nArray object by transferring ownership. An object of this class has all the methods inherited from vctDynamicNArray, but can only be constructed in one way – taking the ownership from another vctDynamicNArray (or vctReturnDynamicNArray) object. In turn, when an assignment occurs from a vctReturnDynamicNArray to a vctDynamicNArray (or likewise construction), the LHS vctDynamicNArray strips this object from the ownership of the data.

Use this class only when you want to return a newly created dynamic nArray from a function, without going through memory allocation and deallocation. Never use it on an object that is going to remain in scope after constructing the vctReturnDynamicNArray.

Member Typedef Documentation

template<class _elementType, vct::size_type _dimension>
typedef vctDynamicNArray<_elementType, _dimension> vctReturnDynamicNArray< _elementType, _dimension >::BaseType

Base type of vctReturnDynamicNArray.

Constructor & Destructor Documentation

template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::vctReturnDynamicNArray ( const BaseType other)
inlineexplicit

Member Function Documentation

template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType  )
template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::VCT_NARRAY_TRAITS_TYPEDEFS ( _dimension  )

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