DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
utl::NDArrayBase< T, Dim > Class Template Reference

#include <utlMatrix.h>

+ Inheritance diagram for utl::NDArrayBase< T, Dim >:
+ Collaboration diagram for utl::NDArrayBase< T, Dim >:

Detailed Description

template<class T, unsigned int Dim>
class utl::NDArrayBase< T, Dim >

Base class for utl::NDArray.

Author
Jian Cheng (JC), jian..nosp@m.chen.nosp@m.g.198.nosp@m.3@gm.nosp@m.ail.c.nosp@m.om

Definition at line 22 of file utlMatrix.h.

Classes

class  ConstReverseIterator
 
class  ReverseIterator
 

Public Types

enum  { Dimension = Dim }
 
typedef const ValueTypeConstIterator
 
typedef const ValueTypeConstPointer
 
typedef const ValueTypeConstReference
 
typedef ValueTypeIterator
 
typedef ValueTypePointer
 
typedef ValueTypeReference
 
typedef utl::remove_complex_t< T > ScalarValueType
 
typedef NDArrayBase Self
 
typedef Superclass::ShapeType ShapeType
 
typedef Superclass::SizeType SizeType
 
typedef Expr< NDArrayBase< T, Dim >, T > Superclass
 
typedef T ValueType
 
- Public Types inherited from utl::Expr< NDArrayBase< T, Dim >, T >
typedef SizeType const * ShapeType
 
typedef unsigned int SizeType
 
typedef T ValueType
 

Public Member Functions

 __Array_Saver_Scalar (+=) __Array_Saver_Scalar(-
 
AbsoluteMaxValue () const
 
AbsoluteMinValue () const
 
template<typename FuncT >
void Apply (const FuncT &func, NDArrayBase< T, Dim > &vec) const
 
void Apply (T(*f)(T), NDArrayBase< T, Dim > &vec) const
 
void Apply (T(*f)(T const &), NDArrayBase< T, Dim > &vec) const
 
unsigned ArgAbsoluteMax () const
 
unsigned ArgAbsoluteMin () const
 
unsigned ArgMax () const
 
unsigned ArgMin () const
 
Reference Back ()
 
ConstReference Back () const
 
Iterator Begin ()
 
ConstIterator Begin () const
 
ConstIterator cBegin () const
 
ConstIterator cEnd () const
 
void Clear ()
 
void CopyData (T *const data, const ShapeType &shape)
 
NDArrayBase< T, Dim > & CopyIn (T const *ptr, const int size, const int start=0)
 
void CopyOut (T *ptr, const int size, const int start=0) const
 
ConstReverseIterator crBegin () const
 
ConstReverseIterator crEnd () const
 
NDArrayBase< T, Dim > & ElementAbsolute (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementAbsolute (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementAdd (T *const vec, T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementAxpby (T *const vec, const T alpha, const T beta)
 
NDArrayBase< T, Dim > & ElementCos (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementCos (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementDivide (T *const vec, T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementExp (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementExp (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementInverse (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementInverse (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementMultiply (T *const vec, T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementSin (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementSin (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementSqrt (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementSqrt (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementSquare (T *outVec=NULL)
 
NDArrayBase< T, Dim > & ElementSquare (NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & ElementSubstract (T *const vec, T *outVec=NULL)
 
Iterator End ()
 
ConstIterator End () const
 
Eval (int i) const
 
void Fill (const T &value)
 
NDArrayBase< T, Dim > & Flip ()
 
T * GetData ()
 
const T * GetData () const
 
ConstReference GetElement (unsigned short index) const
 
NDArrayBase< T, Dim > GetElementAbsolute () const
 
NDArrayBase< T, Dim > GetElementCos () const
 
NDArrayBase< T, Dim > GetElementExp () const
 
NDArrayBase< T, Dim > GetElementInverse () const
 
NDArrayBase< T, Dim > GetElementSin () const
 
NDArrayBase< T, Dim > GetElementSqrt () const
 
NDArrayBase< T, Dim > GetElementSquare () const
 
void GetIndex (const SizeType offset, SizeType index[Dimension]) const
 
double GetInfNorm () const
 
bool GetIsShared () const
 
GetMean () const
 
GetMedian () const
 
SizeType GetOffset (const ShapeType &shapeIndex) const
 
const SizeTypeGetOffSetTable () const
 
double GetOneNorm () const
 
NDArray< T, SubDimensionGetRefSubArray (const int i) const
 
NDArray< T, Dim > GetRefSubArray (const int istart, const int iend) const
 
double GetRootMeanSquares () const
 
const ShapeType GetShape () const
 
SizeType GetSize () const
 
double GetSquaredTwoNorm () const
 
GetSum () const
 
double GetTwoNorm () const
 
int GetZeroNorm (const double eps=1e-10) const
 
void HardThreshold (const double threshold)
 
ValueType InnerProduct (const NDArrayBase< T, Dim > &vec) const
 
bool IsEmpty () const
 
bool IsEqual (const NDArrayBase< T, Dim > &r, const double eps) const
 
template<typename EType >
bool IsSameShape (const EType &src) const
 
bool IsSameShape (const ShapeType &shape) const
 
bool IsSameSize (const ShapeType &shape) const
 
bool IsSameValues (const NDArrayBase< T, Dim > &r, const double eps) const
 
bool IsZero () const
 
MaxValue () const
 
MinValue () const
 
 NDArrayBase ()
 
 NDArrayBase (const ShapeType &shape)
 
 NDArrayBase (const NDArrayBase< T, Dim > &vec)
 
 NDArrayBase (NDArrayBase< T, Dim > &&vec)
 
template<typename EType >
 NDArrayBase (const Expr< EType, typename EType::ValueType > &expr)
 
 NDArrayBase (const T *vec, const ShapeType &shape)
 
 NDArrayBase (const ShapeType &shape, const T r)
 
template<typename TValue >
 NDArrayBase (const NDArrayBase< TValue, Dim > &r)
 
int NNZ (const double eps=1e-10) const
 
NDArrayBase< T, Dim > & operator saver (const T val)
 
bool operator!= (const NDArrayBase< T, Dim > &r) const
 
template<typename EType >
NDArrayBase< T, Dim > & operator%= (const Expr< EType, typename EType::ValueType > &src)
 
NDArrayBase< T, Dim > & operator%= (const NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & operator%= (const T val)
 
Reference operator() (const ShapeType &shape)
 
ConstReference operator() (const ShapeType &shape) const
 
template<typename EType >
NDArrayBase< T, Dim > & operator+= (const Expr< EType, typename EType::ValueType > &src)
 
NDArrayBase< T, Dim > & operator+= (const NDArrayBase< T, Dim > &vec)
 
template<typename EType >
NDArrayBase< T, Dim > & operator-= (const Expr< EType, typename EType::ValueType > &src)
 
NDArrayBase< T, Dim > & operator-= (const NDArrayBase< T, Dim > &vec)
 
template<typename EType >
NDArrayBase< T, Dim > & operator/= (const Expr< EType, typename EType::ValueType > &src)
 
NDArrayBase< T, Dim > & operator/= (const NDArrayBase< T, Dim > &vec)
 
NDArrayBase< T, Dim > & operator/= (const T val)
 
template<typename EType >
NDArrayBase< T, Dim > & operator= (const Expr< EType, typename EType::ValueType > &src)
 
Dim & operator= (const NDArrayBase< T, Dim > &r)
 
NDArrayBase< T, Dim > & operator= (NDArrayBase< T, Dim > &&r)
 
template<typename TValueType >
NDArrayBase< T, Dim > & operator= (const NDArrayBase< TValueType, Dim > &r)
 
NDArrayBase< T, Dim > & operator= (const std::initializer_list< T > &r)
 
NDArrayBase< T, Dim > & operator= (const std::vector< T > &r)
 
NDArrayBase< T, Dim > & operator= (const T r)
 
bool operator== (const NDArrayBase< T, Dim > &r) const
 
Reference operator[] (short index)
 
ConstReference operator[] (short index) const
 
Reference operator[] (unsigned short index)
 
ConstReference operator[] (unsigned short index) const
 
Reference operator[] (int index)
 
ConstReference operator[] (int index) const
 
Reference operator[] (unsigned int index)
 
ConstReference operator[] (unsigned int index) const
 
Reference operator[] (long index)
 
ConstReference operator[] (long index) const
 
Reference operator[] (unsigned long index)
 
ConstReference operator[] (unsigned long index) const
 
Reference operator[] (long long index)
 
ConstReference operator[] (long long index) const
 
Reference operator[] (unsigned long long index)
 
ConstReference operator[] (unsigned long long index) const
 
void Print (std::ostream &os, const char *separate=" ") const
 
void PrintInfo (std::ostream &os, const char *separate=" ") const
 
void PrintWithIndex (std::ostream &os, const char *separate=" ") const
 
ReverseIterator rBegin ()
 
ConstReverseIterator rBegin () const
 
ReverseIterator rEnd ()
 
ConstReverseIterator rEnd () const
 
NDArrayBase< T, Dim > & ReShape (const ShapeType &shape)
 
bool ReSize (const ShapeType &shape)
 
NDArrayBase< T, Dim > & Scale (const T a)
 
void SetData (T *const data, const ShapeType &shape)
 
void SetElement (unsigned short index, ConstReference value)
 
SizeType Size () const
 
void SoftThreshold (const double threshold)
 
void Swap (NDArrayBase< T, Dim > &vec)
 
 ~NDArrayBase ()
 
- Public Member Functions inherited from utl::Expr< NDArrayBase< T, Dim >, T >
const NDArrayBase< T, Dim > & ConstRef (void) const
 
const ShapeType GetShape () const
 
NDArrayBase< T, Dim > & Ref (void)
 

Static Public Member Functions

static constexpr SizeType GetDimension ()
 
- Static Public Member Functions inherited from utl::Expr< NDArrayBase< T, Dim >, T >
static SizeType GetDimension ()
 

Static Public Attributes

static constexpr SizeType SubDimension = Dim>1?Dim-1:1
 

Protected Member Functions

void ClearData ()
 
void ClearShape ()
 
void ComputeOffSetTable ()
 

Protected Attributes

T * m_Data
 
bool m_IsShared
 
SizeType m_OffSetTable [Dimension]
 
SizeType m_Shape [Dimension]
 

Member Typedef Documentation

template<class T, unsigned int Dim>
typedef const ValueType* utl::NDArrayBase< T, Dim >::ConstIterator

A const iterator through the array.

Definition at line 171 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef const ValueType* utl::NDArrayBase< T, Dim >::ConstPointer

Definition at line 175 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef const ValueType& utl::NDArrayBase< T, Dim >::ConstReference

Definition at line 179 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef ValueType* utl::NDArrayBase< T, Dim >::Iterator

An iterator through the array.

Definition at line 168 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef ValueType* utl::NDArrayBase< T, Dim >::Pointer

A pointer to the ValueType.

Definition at line 174 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef ValueType& utl::NDArrayBase< T, Dim >::Reference

A reference to the ValueType.

Definition at line 178 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef utl::remove_complex_t<T> utl::NDArrayBase< T, Dim >::ScalarValueType

Definition at line 165 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef NDArrayBase utl::NDArrayBase< T, Dim >::Self

The element type stored at each location in the NDArrayBase.

Definition at line 146 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef Superclass::ShapeType utl::NDArrayBase< T, Dim >::ShapeType

Definition at line 155 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef Superclass::SizeType utl::NDArrayBase< T, Dim >::SizeType

Definition at line 154 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef Expr<NDArrayBase<T, Dim>, T > utl::NDArrayBase< T, Dim >::Superclass

Definition at line 152 of file utlNDArray.h.

template<class T, unsigned int Dim>
typedef T utl::NDArrayBase< T, Dim >::ValueType

Definition at line 164 of file utlNDArray.h.

Member Enumeration Documentation

template<class T, unsigned int Dim>
anonymous enum
Enumerator
Dimension 

Definition at line 160 of file utlNDArray.h.

Constructor & Destructor Documentation

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( )
inline

Default constructor uses compiler's default initialization of memory. For efficiency, no initialization to zero is done.

Definition at line 229 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( const ShapeType shape)
inlineexplicit

Definition at line 235 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( const NDArrayBase< T, Dim > &  vec)
inline

Definition at line 240 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( NDArrayBase< T, Dim > &&  vec)
inline

Definition at line 246 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
utl::NDArrayBase< T, Dim >::NDArrayBase ( const Expr< EType, typename EType::ValueType > &  expr)
inline

Definition at line 255 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( const T *  vec,
const ShapeType shape 
)
inline

Constructor assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the T's assignment operator to be executed.

Definition at line 267 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::NDArrayBase ( const ShapeType shape,
const T  r 
)
inline

Constructor to initialize entire array to one value.

Definition at line 276 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename TValue >
utl::NDArrayBase< T, Dim >::NDArrayBase ( const NDArrayBase< TValue, Dim > &  r)
inline

Definition at line 283 of file utlNDArray.h.

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::~NDArrayBase ( )
inline

This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory.

The destructor is PURPOSELY NOT DEFINED, in order to prevent inefficient byte alignment of arrays of this object.

For a full discussion, see http://www.itk.org/mailman/private/insight-developers/2008-June/010480.html

Definition at line 302 of file utlNDArray.h.

Member Function Documentation

template<class T, unsigned int Dim>
utl::NDArrayBase< T, Dim >::__Array_Saver_Scalar ( )
template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::AbsoluteMaxValue ( ) const
inline

Definition at line 989 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetTwoNorm().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::AbsoluteMinValue ( ) const
inline

Definition at line 999 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::AbsoluteMinValue().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
template<typename FuncT >
void utl::NDArrayBase< T, Dim >::Apply ( const FuncT &  func,
NDArrayBase< T, Dim > &  vec 
) const
inline

Applies function to elements

Definition at line 945 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Apply().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Apply ( T(*)(T)  f,
NDArrayBase< T, Dim > &  vec 
) const
inline

Definition at line 951 of file utlNDArray.h.

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Apply ( T(*)(T const &)  f,
NDArrayBase< T, Dim > &  vec 
) const
inline

Definition at line 957 of file utlNDArray.h.

template<class T, unsigned int Dim>
unsigned utl::NDArrayBase< T, Dim >::ArgAbsoluteMax ( ) const
inline

Definition at line 984 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ArgAbsoluteMin().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
unsigned utl::NDArrayBase< T, Dim >::ArgAbsoluteMin ( ) const
inline

Definition at line 995 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetInfNorm().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
unsigned utl::NDArrayBase< T, Dim >::ArgMax ( ) const
inline

Definition at line 964 of file utlNDArray.h.

template<class T, unsigned int Dim>
unsigned utl::NDArrayBase< T, Dim >::ArgMin ( ) const
inline

Definition at line 974 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::Back ( )
inline

Definition at line 576 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Begin().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::Back ( ) const
inline

Definition at line 577 of file utlNDArray.h.

template<class T, unsigned int Dim>
Iterator utl::NDArrayBase< T, Dim >::Begin ( )
inline
template<class T, unsigned int Dim>
ConstIterator utl::NDArrayBase< T, Dim >::Begin ( ) const
inline

Get a ConstIterator for the beginning of the NDArrayBase.

Definition at line 590 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstIterator utl::NDArrayBase< T, Dim >::cBegin ( ) const
inline

Definition at line 594 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstIterator utl::NDArrayBase< T, Dim >::cEnd ( ) const
inline

Definition at line 614 of file utlNDArray.h.

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Clear ( )
inline
template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::ClearData ( )
inlineprotected

Definition at line 1176 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Clear().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::ClearShape ( )
inlineprotected

Definition at line 1184 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Clear().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::ComputeOffSetTable ( )
inlineprotected

Definition at line 1190 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ComputeOffSetTable(), and utl::NDArray< T, 2 >::TransposeInplace().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::CopyData ( T *const  data,
const ShapeType shape 
)
inline

copy m_Data from data

Definition at line 689 of file utlNDArray.h.

Referenced by utl::NDArray< T, 1 >::CopyData(), and utl::NDArray< T, 2 >::CopyData().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::CopyIn ( T const *  ptr,
const int  size,
const int  start = 0 
)
inline

Set elements from ptr (starting with m_Data + start )

Definition at line 928 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::CopyIn().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::CopyOut ( T *  ptr,
const int  size,
const int  start = 0 
) const
inline

Set elements to ptr (starting with m_Data + start )

Definition at line 936 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReverseIterator utl::NDArrayBase< T, Dim >::crBegin ( ) const
inline

Definition at line 634 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReverseIterator utl::NDArrayBase< T, Dim >::crEnd ( ) const
inline

Definition at line 654 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementAbsolute ( T *  outVec = NULL)
inline
template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementAbsolute ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 843 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementAdd ( T *const  vec,
T *  outVec = NULL 
)
inline

y = a+x, make sure vec and outVec have valid length. when outVec is null, the result is stored in *this.

Definition at line 808 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator-=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementAxpby ( T *const  vec,
const T  alpha,
const T  beta 
)
inline

m_Data[i] = alpha*vec[i] + beta*m_Data[i]

Definition at line 870 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Scale().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementCos ( T *  outVec = NULL)
inline

Definition at line 827 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSin(), utl::NDArrayBase< T, 4 >::GetElementCos(), and utl::NDArrayBase< T, 4 >::GetElementSin().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementCos ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 829 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementDivide ( T *const  vec,
T *  outVec = NULL 
)
inline

Definition at line 817 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator%=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementExp ( T *  outVec = NULL)
inline

Definition at line 820 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementCos(), utl::NDArrayBase< T, 4 >::GetElementCos(), and utl::NDArrayBase< T, 4 >::GetElementExp().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementExp ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 822 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementInverse ( T *  outVec = NULL)
inline

Definition at line 848 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSqrt(), utl::NDArrayBase< T, 4 >::GetElementInverse(), and utl::NDArrayBase< T, 4 >::GetElementSqrt().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementInverse ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 850 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementMultiply ( T *const  vec,
T *  outVec = NULL 
)
inline

Definition at line 814 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator/=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSin ( T *  outVec = NULL)
inline

Definition at line 834 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementAbsolute(), utl::NDArrayBase< T, 4 >::GetElementAbsolute(), and utl::NDArrayBase< T, 4 >::GetElementSin().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSin ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 836 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSqrt ( T *  outVec = NULL)
inline

Definition at line 855 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSquare(), utl::NDArrayBase< T, 4 >::GetElementSqrt(), and utl::NDArrayBase< T, 4 >::GetElementSquare().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSqrt ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 857 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSquare ( T *  outVec = NULL)
inline

Definition at line 862 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementAxpby(), utl::NDArrayBase< T, 4 >::GetElementSquare(), and utl::NDArrayBase< T, 4 >::Scale().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSquare ( NDArrayBase< T, Dim > &  vec)
inline

Definition at line 864 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ElementSubstract ( T *const  vec,
T *  outVec = NULL 
)
inline

Definition at line 811 of file utlNDArray.h.

template<class T, unsigned int Dim>
Iterator utl::NDArrayBase< T, Dim >::End ( )
inline
template<class T, unsigned int Dim>
ConstIterator utl::NDArrayBase< T, Dim >::End ( ) const
inline

Get a ConstIterator for the end of the NDArrayBase.

Definition at line 610 of file utlNDArray.h.

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::Eval ( int  i) const
inline

Definition at line 313 of file utlNDArray.h.

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Fill ( const T &  value)
inline
template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::Flip ( )
inline

Definition at line 1070 of file utlNDArray.h.

template<class T, unsigned int Dim>
T* utl::NDArrayBase< T, Dim >::GetData ( )
inline
template<class T, unsigned int Dim>
const T* utl::NDArrayBase< T, Dim >::GetData ( ) const
inline

Definition at line 671 of file utlNDArray.h.

template<class T, unsigned int Dim>
static constexpr SizeType utl::NDArrayBase< T, Dim >::GetDimension ( )
inlinestatic

Definition at line 335 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::GetElement ( unsigned short  index) const
inline

Definition at line 662 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetData().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementAbsolute ( ) const
inline

Definition at line 845 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementInverse().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementCos ( ) const
inline

Definition at line 831 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSin().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementExp ( ) const
inline

Definition at line 824 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementCos().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementInverse ( ) const
inline

Definition at line 852 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSqrt().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementSin ( ) const
inline

Definition at line 838 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementAbsolute().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementSqrt ( ) const
inline

Definition at line 859 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementSquare().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim> utl::NDArrayBase< T, Dim >::GetElementSquare ( ) const
inline

Definition at line 866 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::ElementAxpby().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::GetIndex ( const SizeType  offset,
SizeType  index[Dimension] 
) const
inline

Definition at line 347 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::PrintWithIndex().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
double utl::NDArrayBase< T, Dim >::GetInfNorm ( ) const
inline

Return largest absolute element value

Definition at line 1006 of file utlNDArray.h.

Referenced by utl::NDArray< T, 2 >::GetArrayInfNorm(), and utl::NDArrayBase< T, 4 >::GetInfNorm().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::GetIsShared ( ) const
inline

Definition at line 363 of file utlNDArray.h.

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::GetMean ( ) const
inline

get mean

Definition at line 1049 of file utlNDArray.h.

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::GetMedian ( ) const
inline

Definition at line 1054 of file utlNDArray.h.

template<class T, unsigned int Dim>
SizeType utl::NDArrayBase< T, Dim >::GetOffset ( const ShapeType shapeIndex) const
inline

Definition at line 338 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Back(), and utl::NDArray< T, 4 >::GetRefSubMatrix().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
const SizeType* utl::NDArrayBase< T, Dim >::GetOffSetTable ( ) const
inline

Definition at line 358 of file utlNDArray.h.

template<class T, unsigned int Dim>
double utl::NDArrayBase< T, Dim >::GetOneNorm ( ) const
inline

Return sum of absolute values of elements

Definition at line 1028 of file utlNDArray.h.

Referenced by utl::NDArray< T, 2 >::GetArrayOneNorm().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArray<T,SubDimension> utl::NDArrayBase< T, Dim >::GetRefSubArray ( const int  i) const
inline

Definition at line 732 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArray<T,Dim> utl::NDArrayBase< T, Dim >::GetRefSubArray ( const int  istart,
const int  iend 
) const
inline

Definition at line 750 of file utlNDArray.h.

template<class T, unsigned int Dim>
double utl::NDArrayBase< T, Dim >::GetRootMeanSquares ( ) const
inline

Definition at line 1022 of file utlNDArray.h.

template<class T, unsigned int Dim>
const ShapeType utl::NDArrayBase< T, Dim >::GetShape ( ) const
inline

Definition at line 330 of file utlNDArray.h.

Referenced by utl::ComplexCombine(), utl::Convert4To2Tensor(), utl::InnerProduct(), utl::NDArrayBase< T, 4 >::operator=(), and utl::OuterProduct().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
SizeType utl::NDArrayBase< T, Dim >::GetSize ( ) const
inline

Definition at line 325 of file utlNDArray.h.

template<class T, unsigned int Dim>
double utl::NDArrayBase< T, Dim >::GetSquaredTwoNorm ( ) const
inline

Definition at line 1017 of file utlNDArray.h.

Referenced by utl::ComputeOrientationalOrderFromSHCoefficients(), and itk::SpamsWeightedLassoSolver< TPrecision >::EvaluateCostFunctionInColumn().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::GetSum ( ) const
inline

get sum

Definition at line 1040 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetSum().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
double utl::NDArrayBase< T, Dim >::GetTwoNorm ( ) const
inline
template<class T, unsigned int Dim>
int utl::NDArrayBase< T, Dim >::GetZeroNorm ( const double  eps = 1e-10) const
inline

number of non-zero values

Definition at line 1034 of file utlNDArray.h.

Referenced by utl::NDArray< T, 2 >::GetArrayZeroNorm().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::HardThreshold ( const double  threshold)
inline

Definition at line 1114 of file utlNDArray.h.

template<class T, unsigned int Dim>
ValueType utl::NDArrayBase< T, Dim >::InnerProduct ( const NDArrayBase< T, Dim > &  vec) const
inline

Definition at line 1123 of file utlNDArray.h.

Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::EvaluateCostFunction().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsEmpty ( ) const
inline

Definition at line 1086 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsEqual ( const NDArrayBase< T, Dim > &  r,
const double  eps 
) const
inline
template<class T, unsigned int Dim>
template<typename EType >
bool utl::NDArrayBase< T, Dim >::IsSameShape ( const EType &  src) const
inline

return true if src is a scalar value (dimension of src is 0) or have the same shape.

Definition at line 771 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::IsEqual(), utl::IsSameShape(), utl::NDArrayBase< T, 4 >::operator-=(), and utl::NDArrayBase< T, 4 >::operator==().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsSameShape ( const ShapeType shape) const
inline

Definition at line 789 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsSameSize ( const ShapeType shape) const
inline

Definition at line 801 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::IsSameValues().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsSameValues ( const NDArrayBase< T, Dim > &  r,
const double  eps 
) const
inline

Definition at line 521 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::IsZero ( ) const
inline

Definition at line 1077 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::IsZero().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::MaxValue ( ) const
inline

Definition at line 969 of file utlNDArray.h.

template<class T, unsigned int Dim>
T utl::NDArrayBase< T, Dim >::MinValue ( ) const
inline

Definition at line 979 of file utlNDArray.h.

template<class T, unsigned int Dim>
int utl::NDArrayBase< T, Dim >::NNZ ( const double  eps = 1e-10) const
inline

number of non-zero values

Definition at line 1090 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetSum(), and utl::NDArrayBase< T, 4 >::NNZ().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator saver ( const T  val)
inline

Definition at line 387 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::operator!= ( const NDArrayBase< T, Dim > &  r) const
inline

Definition at line 499 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator%= ( const Expr< EType, typename EType::ValueType > &  src)
inline

use %= for elementwse *=

Definition at line 386 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator%= ( const NDArrayBase< T, Dim > &  vec)
inline

Definition at line 895 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator%= ( const T  val)
inline

Definition at line 908 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator() ( const ShapeType shape)
inline

Definition at line 573 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Back().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator() ( const ShapeType shape) const
inline

Definition at line 574 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator+= ( const Expr< EType, typename EType::ValueType > &  src)
inline

Definition at line 385 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator+=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator+= ( const NDArrayBase< T, Dim > &  vec)
inline

Definition at line 880 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator-= ( const Expr< EType, typename EType::ValueType > &  src)
inline

Definition at line 385 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator-=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator-= ( const NDArrayBase< T, Dim > &  vec)
inline

Definition at line 887 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator/= ( const Expr< EType, typename EType::ValueType > &  src)
inline

Definition at line 386 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator/=().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator/= ( const NDArrayBase< T, Dim > &  vec)
inline

Definition at line 901 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator/= ( const T  val)
inline

Definition at line 913 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename EType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( const Expr< EType, typename EType::ValueType > &  src)
inline
template<class T, unsigned int Dim>
Dim& utl::NDArrayBase< T, Dim >::operator= ( const NDArrayBase< T, Dim > &  r)
inline

Definition at line 401 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( NDArrayBase< T, Dim > &&  r)
inline

Definition at line 412 of file utlNDArray.h.

template<class T, unsigned int Dim>
template<typename TValueType >
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( const NDArrayBase< TValueType, Dim > &  r)
inline

Operator= defined for a variety of types.

Definition at line 424 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( const std::initializer_list< T > &  r)
inline

Definition at line 434 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( const std::vector< T > &  r)
inline

Assignment operator assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the T's assignment operator to be executed.

If Dimension==1, then ReSize is used. If Dimension>1, the sizes of the array and the input std::vector should be the same.

Definition at line 458 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::operator= ( const T  r)
inline

Definition at line 474 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::operator== ( const NDArrayBase< T, Dim > &  r) const
inline

Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.

Definition at line 480 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::IsEqual(), and utl::NDArrayBase< T, 4 >::operator==().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( short  index)
inline

Allow the NDArrayBase to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 544 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::operator()(), and utl::NDArrayBase< T, 4 >::operator[]().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( short  index) const
inline

Definition at line 545 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( unsigned short  index)
inline

Definition at line 546 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( unsigned short  index) const
inline

Definition at line 547 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( int  index)
inline

Definition at line 548 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( int  index) const
inline

Definition at line 549 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( unsigned int  index)
inline

Definition at line 557 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( unsigned int  index) const
inline

Definition at line 558 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( long  index)
inline

Definition at line 564 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( long  index) const
inline

Definition at line 565 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( unsigned long  index)
inline

Definition at line 566 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( unsigned long  index) const
inline

Definition at line 567 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( long long  index)
inline

Definition at line 568 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( long long  index) const
inline

Definition at line 569 of file utlNDArray.h.

template<class T, unsigned int Dim>
Reference utl::NDArrayBase< T, Dim >::operator[] ( unsigned long long  index)
inline

Definition at line 570 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReference utl::NDArrayBase< T, Dim >::operator[] ( unsigned long long  index) const
inline

Definition at line 571 of file utlNDArray.h.

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Print ( std::ostream &  os,
const char *  separate = " " 
) const
inline

Definition at line 1135 of file utlNDArray.h.

Referenced by utl::operator<<(), utl::PrintUtlNDArray(), and itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::PrintInfo ( std::ostream &  os,
const char *  separate = " " 
) const
inline

Definition at line 1127 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::PrintInfo(), and utl::NDArrayBase< T, 4 >::PrintWithIndex().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::PrintWithIndex ( std::ostream &  os,
const char *  separate = " " 
) const
inline

Definition at line 1142 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::PrintWithIndex().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
ReverseIterator utl::NDArrayBase< T, Dim >::rBegin ( )
inline

Get a begin ReverseIterator.

Definition at line 622 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReverseIterator utl::NDArrayBase< T, Dim >::rBegin ( ) const
inline

Get a begin ConstReverseIterator.

Definition at line 630 of file utlNDArray.h.

template<class T, unsigned int Dim>
ReverseIterator utl::NDArrayBase< T, Dim >::rEnd ( )
inline

Get an end ReverseIterator.

Definition at line 642 of file utlNDArray.h.

template<class T, unsigned int Dim>
ConstReverseIterator utl::NDArrayBase< T, Dim >::rEnd ( ) const
inline

Get an end ConstReverseIterator.

Definition at line 650 of file utlNDArray.h.

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::ReShape ( const ShapeType shape)
inline

change the shape, no data allocation (same size)

Definition at line 722 of file utlNDArray.h.

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::ReSize ( const ShapeType shape)
inline

If the current size is different from the size in shape, then data allocation happens. Otherwise, just change the shape using ReShape.

Definition at line 697 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Apply(), utl::NDArrayBase< T, 4 >::ArgMax(), utl::NDArray< T, 1 >::NDArray(), utl::NDArrayBase< T, 4 >::operator=(), utl::PointsContainerToUtlMatrix(), utl::NDArray< T, 2 >::ReSize(), utl::NDArray< T, 4 >::ReSize(), and utl::NDArray< T, 1 >::ReSize().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
NDArrayBase<T,Dim>& utl::NDArrayBase< T, Dim >::Scale ( const T  a)
inline
template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::SetData ( T *const  data,
const ShapeType shape 
)
inline

set m_Data from data, the ownership is in data.

Definition at line 677 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::GetRefSubArray(), utl::NDArray< T, 1 >::SetData(), utl::NDArray< T, 2 >::SetData(), and utl::NDArrayBase< T, 4 >::SetData().

+ Here is the caller graph for this function:

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::SetElement ( unsigned short  index,
ConstReference  value 
)
inline

Set/Get element methods are more convenient in wrapping languages

Definition at line 660 of file utlNDArray.h.

template<class T, unsigned int Dim>
SizeType utl::NDArrayBase< T, Dim >::Size ( ) const
inline

Get the size of the NDArrayBase.

Definition at line 321 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::AbsoluteMaxValue(), utl::NDArrayBase< T, 4 >::AbsoluteMinValue(), utl::NDArrayBase< T, 4 >::Apply(), utl::NDArrayBase< T, 4 >::ArgMax(), utl::NDArrayBase< T, 4 >::Begin(), utl::ComputeOrientationalOrderFromSHCoefficients(), utl::ConnectUtlVector(), utl::Convert1To2Tensor(), utl::DotProduct(), utl::NDArray< T, 4 >::EigenDecompositionWithMinorSymmetry(), utl::NDArrayBase< T, 4 >::ElementAbsolute(), utl::NDArrayBase< T, 4 >::ElementAdd(), utl::NDArrayBase< T, 4 >::ElementCos(), utl::NDArrayBase< T, 4 >::ElementDivide(), utl::NDArrayBase< T, 4 >::ElementExp(), utl::NDArrayBase< T, 4 >::ElementInverse(), utl::NDArrayBase< T, 4 >::ElementMultiply(), utl::NDArrayBase< T, 4 >::ElementSin(), utl::NDArrayBase< T, 4 >::ElementSqrt(), utl::NDArrayBase< T, 4 >::ElementSquare(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::EvaluateCostFunction(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::EvaluateCostFunction(), itk::SpamsWeightedLassoSolver< TPrecision >::EvaluateCostFunction(), itk::SpamsWeightedLassoSolver< TPrecision >::EvaluateCostFunctionInColumn(), utl::NDArray< T, 2 >::ExpM(), utl::NDArray< T, 1 >::GetDiagonalMatrix(), utl::NDArrayBase< T, 4 >::GetElementExp(), utl::NDArrayBase< T, 4 >::GetElementSquare(), utl::GetMeanOfRotationMatrix(), utl::GetMXArrayFromUtlVector(), utl::NDArrayBase< T, 4 >::GetOneNorm(), utl::NDArray< T, 1 >::GetRotateAxis(), itk::SHCoefficientsRotation< T >::GetRotatedSHCoefficients(), utl::NDArrayBase< T, 4 >::GetSquaredTwoNorm(), utl::GetUtlVectorFromMXArray(), utl::NDArrayBase< T, 4 >::GetZeroNorm(), utl::NDArrayBase< T, 4 >::HardThreshold(), itk::SolverBase< TPrecision >::Initialize(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Initialize(), utl::InnerProduct(), utl::NDArrayBase< T, 4 >::IsZero(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Iterate(), utl::NDArray< T, 2 >::LogM(), utl::MeanDirector(), utl::NDArray< T, 4 >::NDArray(), utl::NDArray< T, 2 >::NDArray(), utl::NDArray< T, 1 >::NDArray(), utl::NDArrayBase< T, 4 >::NDArrayBase(), utl::NDArrayBase< T, 4 >::NNZ(), utl::NormalizeGrad(), utl::NDArrayBase< T, 4 >::operator%=(), utl::operator*(), utl::NDArrayBase< T, 4 >::operator+=(), utl::NDArrayBase< T, 4 >::operator-=(), utl::NDArrayBase< T, 4 >::operator/=(), utl::OuterProduct(), utl::PInverseMatrix(), utl::NDArrayBase< T, 4 >::PrintWithIndex(), utl::NDArrayBase< T, 4 >::Scale(), utl::NDArray< T, 2 >::SetColumn(), utl::NDArray< T, 2 >::SetDiagonal(), utl::NDArray< T, 2 >::SetRow(), utl::NDArrayBase< T, 4 >::SoftThreshold(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), utl::UtlVectorToStdVector(), utl::UtlVectorToVariableLengthVector(), spams::UtlVectorToVector(), utl::UtlVectorToVnlVector(), and spams::VectorToUtlVector().

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::SoftThreshold ( const double  threshold)
inline

Definition at line 1101 of file utlNDArray.h.

template<class T, unsigned int Dim>
void utl::NDArrayBase< T, Dim >::Swap ( NDArrayBase< T, Dim > &  vec)
inline

Member Data Documentation

template<class T, unsigned int Dim>
T* utl::NDArrayBase< T, Dim >::m_Data
protected

Internal C array representation.

Definition at line 1174 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::AbsoluteMaxValue(), utl::NDArrayBase< T, 4 >::AbsoluteMinValue(), utl::NDArrayBase< T, 4 >::Apply(), utl::NDArrayBase< T, 4 >::ArgAbsoluteMin(), utl::NDArrayBase< T, 4 >::ArgMax(), utl::NDArrayBase< T, 4 >::Back(), utl::NDArrayBase< T, 4 >::Begin(), utl::NDArrayBase< T, 4 >::Clear(), utl::NDArrayBase< T, 4 >::ClearShape(), utl::NDArray< T, 2 >::Determinant(), utl::NDArrayBase< T, 4 >::ElementAbsolute(), utl::NDArrayBase< T, 4 >::ElementAxpby(), utl::NDArrayBase< T, 4 >::ElementCos(), utl::NDArrayBase< T, 4 >::ElementDivide(), utl::NDArrayBase< T, 4 >::ElementExp(), utl::NDArrayBase< T, 4 >::ElementInverse(), utl::NDArrayBase< T, 4 >::ElementMultiply(), utl::NDArrayBase< T, 4 >::ElementSin(), utl::NDArrayBase< T, 4 >::ElementSqrt(), utl::NDArrayBase< T, 4 >::ElementSquare(), utl::NDArrayBase< T, 4 >::Eval(), utl::NDArray< T, 2 >::GetColumn(), utl::NDArrayBase< T, 4 >::GetData(), utl::NDArrayBase< T, 4 >::GetElementExp(), utl::NDArrayBase< T, 4 >::GetElementSquare(), utl::NDArray< T, 2 >::GetInfNorm(), utl::NDArrayBase< T, 4 >::GetInfNorm(), utl::NDArray< T, 2 >::GetOneNorm(), utl::NDArrayBase< T, 4 >::GetRefSubArray(), utl::NDArray< T, 4 >::GetRefSubMatrix(), utl::NDArray< T, 2 >::GetRow(), utl::NDArrayBase< T, 4 >::GetSquaredTwoNorm(), utl::NDArray< T, 1 >::GetSubVector(), utl::NDArray< T, 2 >::GetTranspose(), utl::NDArrayBase< T, 4 >::GetZeroNorm(), utl::NDArrayBase< T, 4 >::InnerProduct(), utl::NDArrayBase< T, 4 >::IsEqual(), utl::NDArrayBase< T, 4 >::IsSameValues(), utl::NDArrayBase< T, 4 >::IsZero(), utl::NDArray< T, 4 >::NDArray(), utl::NDArray< T, 2 >::NDArray(), utl::NDArray< T, 1 >::NDArray(), utl::NDArrayBase< T, 4 >::NDArrayBase(), utl::NDArrayBase< T, 4 >::operator%=(), utl::NDArray< T, 4 >::operator()(), utl::NDArray< T, 2 >::operator()(), utl::NDArray< T, 1 >::operator()(), utl::NDArrayBase< T, 4 >::operator()(), utl::NDArrayBase< T, 4 >::operator+=(), utl::NDArrayBase< T, 4 >::operator-=(), utl::NDArrayBase< T, 4 >::operator/=(), utl::NDArrayBase< T, 4 >::operator==(), utl::NDArrayBase< T, 4 >::operator[](), utl::NDArrayBase< T, 4 >::PrintWithIndex(), utl::NDArrayBase< T, 4 >::Scale(), utl::NDArray< T, 2 >::SetColumn(), utl::NDArrayBase< T, 4 >::SetData(), utl::NDArray< T, 2 >::SetRow(), utl::NDArray< T, 1 >::SetSubVector(), utl::NDArrayBase< T, 4 >::SoftThreshold(), and utl::NDArray< T, 2 >::TransposeInplace().

template<class T, unsigned int Dim>
bool utl::NDArrayBase< T, Dim >::m_IsShared
protected

If m_IsShared is true, the memory is owned by other object

Definition at line 1171 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Clear(), utl::NDArrayBase< T, 4 >::GetIsShared(), and utl::NDArrayBase< T, 4 >::SetData().

template<class T, unsigned int Dim>
SizeType utl::NDArrayBase< T, Dim >::m_OffSetTable[Dimension]
protected
template<class T, unsigned int Dim>
SizeType utl::NDArrayBase< T, Dim >::m_Shape[Dimension]
protected

Definition at line 1168 of file utlNDArray.h.

Referenced by utl::NDArrayBase< T, 4 >::Apply(), utl::NDArrayBase< T, 4 >::ArgMax(), utl::NDArray< T, 2 >::Cols(), utl::NDArray< T, 2 >::Columns(), utl::NDArray< T, 2 >::Determinant(), utl::NDArray< T, 2 >::EigenDecompositionSymmetricMatrix(), utl::NDArray< T, 4 >::EigenDecompositionWithMinorSymmetry(), utl::NDArrayBase< T, 4 >::ElementAbsolute(), utl::NDArrayBase< T, 4 >::ElementAxpby(), utl::NDArrayBase< T, 4 >::ElementCos(), utl::NDArrayBase< T, 4 >::ElementInverse(), utl::NDArrayBase< T, 4 >::ElementSin(), utl::NDArrayBase< T, 4 >::ElementSqrt(), utl::NDArrayBase< T, 4 >::ElementSquare(), utl::NDArray< T, 2 >::FillDiagonal(), utl::NDArray< T, 2 >::GetColumn(), utl::NDArray< T, 2 >::GetColumns(), utl::NDArray< T, 2 >::GetCrop(), utl::NDArray< T, 2 >::GetDiagonal(), utl::NDArray< T, 2 >::GetInfNorm(), utl::NDArray< T, 2 >::GetOneNorm(), utl::NDArrayBase< T, 4 >::GetRefSubArray(), utl::NDArray< T, 4 >::GetRefSubMatrix(), utl::NDArray< T, 2 >::GetRow(), utl::NDArray< T, 2 >::GetRows(), utl::NDArrayBase< T, 4 >::GetShape(), utl::NDArray< T, 2 >::GetTranspose(), utl::NDArray< T, 4 >::IsMajorSymmetric(), utl::NDArray< T, 4 >::IsMinorSymmetric(), utl::NDArrayBase< T, 4 >::IsSameShape(), utl::NDArray< T, 2 >::IsSquareMatrix(), utl::NDArray< T, 2 >::IsSymmetric(), utl::NDArray< T, 4 >::MajorSymmetrize(), utl::NDArray< T, 4 >::MinorSymmetrize(), utl::NDArrayBase< T, 4 >::NDArrayBase(), utl::NDArray< T, 2 >::operator()(), utl::NDArrayBase< T, 4 >::PrintWithIndex(), utl::NDArray< T, 2 >::Rows(), utl::NDArray< T, 2 >::Save(), utl::NDArray< T, 2 >::SetColumn(), utl::NDArray< T, 2 >::SetCrop(), utl::NDArray< T, 2 >::SetDiagonal(), utl::NDArray< T, 2 >::SetIdentity(), utl::NDArray< T, 2 >::SetRow(), utl::NDArray< T, 2 >::Symmetrize(), and utl::NDArray< T, 2 >::TransposeInplace().

template<class T, unsigned int Dim>
constexpr SizeType utl::NDArrayBase< T, Dim >::SubDimension = Dim>1?Dim-1:1
static

Definition at line 162 of file utlNDArray.h.


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