UT_VectorT< T > Class Template Reference

#include <UT_Vector.h>

List of all members.

Public Member Functions

 UT_VectorT ()
 UT_VectorT (int nl, int nh)
 UT_VectorT (const UT_VectorT< T > &v)
 ~UT_VectorT ()
void init (int nl, int nh)
void subvector (const UT_VectorT< T > &v, int nl, int nh)
void assign (const fpreal32 *data, int nl, int nh)
void assign (const fpreal64 *data, int nl, int nh)
int isInit () const
void zero (int nl, int nh)
void zero ()
void getSubvector2 (UT_Vector2 &v, int idx) const
void setSubvector2 (int idx, const UT_Vector2 &v)
void getSubvector3 (UT_Vector3 &v, int idx) const
void setSubvector3 (int idx, const UT_Vector3 &v)
void getSubvector4 (UT_Vector4 &v, int idx) const
void setSubvector4 (int idx, const UT_Vector4 &v)
int getNL () const
int getNH () const
int length () const
bool shouldMultiThread () const
void getPartialRange (int &start, int &end, const UT_JobInfo &info) const
void changeNL (int nl)
void setShallowNL (int nl)
void setShallowNH (int nh)
T & operator() (int i)
operator() (int i) const
norm (int type=2) const
norm2 () const
distance2 (const UT_VectorT< T > &v) const
 THREADED_METHOD (UT_VectorT, shouldMultiThread(), neg) void negPartial(const UT_JobInfo &info)
 THREADED_METHOD1 (UT_VectorT, shouldMultiThread(), negPlus, const UT_VectorT< T > &, v) void negPlusPartial(const UT_VectorT< T > &v
 THREADED_METHOD2 (UT_VectorT, shouldMultiThread(), addScaledVec, T, s, const UT_VectorT< T > &, v) void addScaledVecPartial(T s
 THREADED_METHOD3 (UT_VectorT, shouldMultiThread(), addScaledVecNorm2, T, s, const UT_VectorT< T > &, v, fpreal64 *, norm2) void addScaledVecNorm2Partial(T s
 THREADED_METHOD2 (UT_VectorT< T >, shouldMultiThread(), scaleAddVec, T, s, const UT_VectorT< T > &, v) void scaleAddVecPartial(T s
 THREADED_METHOD2 (UT_VectorT< T >, shouldMultiThread(), multAndSet, const UT_VectorT< T > &, a, const UT_VectorT< T > &, b) void multAndSetPartial(const UT_VectorT< T > &a
dot (const UT_VectorT< T > &v) const
UT_VectorToperator= (const UT_VectorT< T > &v)
UT_VectorToperator+= (const UT_VectorT< T > &v)
UT_VectorToperator-= (const UT_VectorT< T > &v)
UT_VectorToperator*= (const UT_VectorT< T > &v)
UT_VectorToperator/= (const UT_VectorT< T > &v)
UT_VectorToperator*= (T scalar)
UT_VectorToperator/= (T scalar)
bool isEqual (const UT_VectorT< T > &v, int64 ulps)
ostream & save (ostream &os) const
T * getData () const
bool hasNan () const
void testForNan () const
template<>
UT_VectorT< fpreal32 > & operator+= (const UT_VectorT< fpreal32 > &v)
template<>
UT_VectorT< fpreal32 > & operator-= (const UT_VectorT< fpreal32 > &v)
template<>
UT_VectorT< fpreal32 > & operator*= (const UT_VectorT< fpreal32 > &v)
template<>
UT_VectorT< fpreal32 > & operator/= (const UT_VectorT< fpreal32 > &v)
template<>
UT_VectorT< fpreal32 > & operator*= (fpreal32 scalar)
template<>
UT_VectorT< fpreal32 > & operator/= (fpreal32 scalar)

Public Attributes

const UT_JobInfoinfo
const UT_VectorT< T > & v
const UT_VectorT< T > const
UT_JobInfo
info
const UT_VectorT< T > fpreal64norm2
const UT_VectorT< T > fpreal64
const UT_JobInfo
info
const UT_VectorT< T > & b

Protected Member Functions

 THREADED_METHOD2_CONST (UT_VectorT, shouldMultiThread(), normInternal, fpreal64 *, result, int, type) void normInternalPartial(fpreal64 *result
 THREADED_METHOD2_CONST (UT_VectorT, shouldMultiThread(), distance2Internal, fpreal64 *, result, const UT_VectorT< T > &, v) void distance2InternalPartial(fpreal64 *result
 THREADED_METHOD2_CONST (UT_VectorT, shouldMultiThread(), dotInternal, fpreal64 *, result, const UT_VectorT< T > &, v) void dotInternalPartial(fpreal64 *result

Protected Attributes

int type
int const UT_JobInfo &info const
const UT_VectorT< T > const
UT_JobInfo &info 
const

Friends

ostream & operator<< (ostream &os, const UT_VectorT< T > &v)


Detailed Description

template<typename T>
class UT_VectorT< T >

Definition at line 39 of file UT_Vector.h.


Constructor & Destructor Documentation

template<typename T>
UT_VectorT< T >::UT_VectorT (  )  [inline]

Definition at line 43 of file UT_Vector.h.

template<typename T >
UT_VectorT< T >::UT_VectorT ( int  nl,
int  nh 
) [inline]

Definition at line 41 of file UT_Vector.C.

template<typename T >
UT_VectorT< T >::UT_VectorT ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 49 of file UT_Vector.C.

template<typename T >
UT_VectorT< T >::~UT_VectorT (  )  [inline]

Definition at line 61 of file UT_Vector.C.


Member Function Documentation

template<typename T >
void UT_VectorT< T >::assign ( const fpreal64 data,
int  nl,
int  nh 
) [inline]

Definition at line 107 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::assign ( const fpreal32 data,
int  nl,
int  nh 
) [inline]

Definition at line 99 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::changeNL ( int  nl  )  [inline]

Definition at line 219 of file UT_Vector.C.

template<typename T >
T UT_VectorT< T >::distance2 ( const UT_VectorT< T > &  v  )  const [inline]

Definition at line 306 of file UT_Vector.C.

template<typename T >
T UT_VectorT< T >::dot ( const UT_VectorT< T > &  v  )  const [inline]

Definition at line 510 of file UT_Vector.C.

template<typename T>
T* UT_VectorT< T >::getData ( void   )  const [inline]

Definition at line 201 of file UT_Vector.h.

template<typename T>
int UT_VectorT< T >::getNH (  )  const [inline]

Definition at line 81 of file UT_Vector.h.

template<typename T>
int UT_VectorT< T >::getNL (  )  const [inline]

Definition at line 78 of file UT_Vector.h.

template<typename T >
void UT_VectorT< T >::getPartialRange ( int &  start,
int &  end,
const UT_JobInfo info 
) const [inline]

Definition at line 145 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::getSubvector2 ( UT_Vector2 v,
int  idx 
) const [inline]

These methods allow one to read out and write into subvectors of UT_Vector using our other vector classes. Keep in mind that the usual UT_Vector? methods are 0 based, while this class is usually 1 based.

Definition at line 165 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::getSubvector3 ( UT_Vector3 v,
int  idx 
) const [inline]

Definition at line 181 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::getSubvector4 ( UT_Vector4 v,
int  idx 
) const [inline]

Definition at line 199 of file UT_Vector.C.

template<typename T >
bool UT_VectorT< T >::hasNan (  )  const [inline]

Definition at line 568 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::init ( int  nl,
int  nh 
) [inline]

Definition at line 115 of file UT_Vector.C.

template<typename T >
bool UT_VectorT< T >::isEqual ( const UT_VectorT< T > &  v,
int64  ulps 
) [inline]

Definition at line 554 of file UT_Vector.C.

template<typename T>
int UT_VectorT< T >::isInit (  )  const [inline]

Definition at line 59 of file UT_Vector.h.

template<typename T>
int UT_VectorT< T >::length ( void   )  const [inline]

Definition at line 84 of file UT_Vector.h.

template<typename T >
T UT_VectorT< T >::norm ( int  type = 2  )  const [inline]

Definition at line 230 of file UT_Vector.C.

template<typename T>
T UT_VectorT< T >::norm2 (  )  const

template<typename T>
T UT_VectorT< T >::operator() ( int  i  )  const [inline]

Definition at line 117 of file UT_Vector.h.

template<typename T>
T& UT_VectorT< T >::operator() ( int  i  )  [inline]

Definition at line 112 of file UT_Vector.h.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator*= ( fpreal32  scalar  )  [inline]

Definition at line 713 of file UT_Vector.C.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator*= ( const UT_VectorT< fpreal32 > &  v  )  [inline]

Definition at line 697 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator*= ( scalar  )  [inline]

Definition at line 485 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator*= ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 463 of file UT_Vector.C.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator+= ( const UT_VectorT< fpreal32 > &  v  )  [inline]

Definition at line 681 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator+= ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 441 of file UT_Vector.C.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator-= ( const UT_VectorT< fpreal32 > &  v  )  [inline]

Definition at line 689 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator-= ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 452 of file UT_Vector.C.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator/= ( fpreal32  scalar  )  [inline]

Definition at line 721 of file UT_Vector.C.

template<>
UT_VectorT< fpreal32 > & UT_VectorT< fpreal32 >::operator/= ( const UT_VectorT< fpreal32 > &  v  )  [inline]

Definition at line 705 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator/= ( scalar  )  [inline]

Definition at line 497 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator/= ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 474 of file UT_Vector.C.

template<typename T >
UT_VectorT< T > & UT_VectorT< T >::operator= ( const UT_VectorT< T > &  v  )  [inline]

Definition at line 431 of file UT_Vector.C.

template<typename T >
ostream & UT_VectorT< T >::save ( ostream &  os  )  const [inline]

Definition at line 542 of file UT_Vector.C.

template<typename T>
void UT_VectorT< T >::setShallowNH ( int  nh  )  [inline]

Definition at line 109 of file UT_Vector.h.

template<typename T>
void UT_VectorT< T >::setShallowNL ( int  nl  )  [inline]

Definition at line 108 of file UT_Vector.h.

template<typename T >
void UT_VectorT< T >::setSubvector2 ( int  idx,
const UT_Vector2 v 
) [inline]

Definition at line 173 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::setSubvector3 ( int  idx,
const UT_Vector3 v 
) [inline]

Definition at line 190 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::setSubvector4 ( int  idx,
const UT_Vector4 v 
) [inline]

Definition at line 209 of file UT_Vector.C.

template<typename T>
bool UT_VectorT< T >::shouldMultiThread (  )  const [inline]

Definition at line 90 of file UT_Vector.h.

template<typename T >
void UT_VectorT< T >::subvector ( const UT_VectorT< T > &  v,
int  nl,
int  nh 
) [inline]

Definition at line 69 of file UT_Vector.C.

template<typename T >
void UT_VectorT< T >::testForNan (  )  const [inline]

Definition at line 580 of file UT_Vector.C.

template<typename T>
UT_VectorT< T >::THREADED_METHOD ( UT_VectorT< T >  ,
shouldMultiThread()  ,
neg   
) const

template<typename T>
UT_VectorT< T >::THREADED_METHOD1 ( UT_VectorT< T >  ,
shouldMultiThread()  ,
negPlus  ,
const UT_VectorT< T > &  ,
v   
) const

template<typename T>
UT_VectorT< T >::THREADED_METHOD2 ( UT_VectorT< T >  ,
shouldMultiThread()  ,
multAndSet  ,
const UT_VectorT< T > &  ,
a  ,
const UT_VectorT< T > &  ,
b   
) const

template<typename T>
UT_VectorT< T >::THREADED_METHOD2 ( UT_VectorT< T >  ,
shouldMultiThread()  ,
scaleAddVec  ,
,
s  ,
const UT_VectorT< T > &  ,
v   
)

template<typename T>
UT_VectorT< T >::THREADED_METHOD2 ( UT_VectorT< T >  ,
shouldMultiThread()  ,
addScaledVec  ,
,
s  ,
const UT_VectorT< T > &  ,
v   
)

template<typename T>
UT_VectorT< T >::THREADED_METHOD2_CONST ( UT_VectorT< T >  ,
shouldMultiThread()  ,
dotInternal  ,
fpreal64 ,
result  ,
const UT_VectorT< T > &  ,
v   
) [protected]

template<typename T>
UT_VectorT< T >::THREADED_METHOD2_CONST ( UT_VectorT< T >  ,
shouldMultiThread()  ,
distance2Internal  ,
fpreal64 ,
result  ,
const UT_VectorT< T > &  ,
v   
) [protected]

template<typename T>
UT_VectorT< T >::THREADED_METHOD2_CONST ( UT_VectorT< T >  ,
shouldMultiThread()  ,
normInternal  ,
fpreal64 ,
result  ,
int  ,
type   
) [protected]

template<typename T>
UT_VectorT< T >::THREADED_METHOD3 ( UT_VectorT< T >  ,
shouldMultiThread()  ,
addScaledVecNorm2  ,
,
s  ,
const UT_VectorT< T > &  ,
v  ,
fpreal64 ,
norm2   
)

template<typename T>
void UT_VectorT< T >::zero (  )  [inline]

Definition at line 63 of file UT_Vector.h.

template<typename T >
void UT_VectorT< T >::zero ( int  nl,
int  nh 
) [inline]

Definition at line 157 of file UT_Vector.C.


Friends And Related Function Documentation

template<typename T>
ostream& operator<< ( ostream &  os,
const UT_VectorT< T > &  v 
) [friend]

Definition at line 198 of file UT_Vector.h.


Member Data Documentation

template<typename T>
const UT_VectorT<T>& UT_VectorT< T >::b

Definition at line 170 of file UT_Vector.h.

template<typename T>
const UT_VectorT<T> const UT_JobInfo& info UT_VectorT< T >::const [protected]

Definition at line 217 of file UT_Vector.h.

template<typename T>
const UT_VectorT< T > const UT_JobInfo &info UT_VectorT< T >::const [protected]

Definition at line 212 of file UT_Vector.h.

template<typename T>
const UT_VectorT<T> fpreal64 const UT_JobInfo& UT_VectorT< T >::info

Definition at line 153 of file UT_Vector.h.

template<typename T>
const UT_VectorT<T> const UT_JobInfo& UT_VectorT< T >::info

Definition at line 145 of file UT_Vector.h.

template<typename T>
const UT_VectorT< T > const UT_JobInfo & UT_VectorT< T >::info

Definition at line 139 of file UT_Vector.h.

template<typename T>
T UT_VectorT< T >::norm2 [inline]

Definition at line 153 of file UT_Vector.h.

template<typename T>
int UT_VectorT< T >::type [protected]

Definition at line 212 of file UT_Vector.h.

template<typename T>
const UT_VectorT< T > & UT_VectorT< T >::v

Definition at line 145 of file UT_Vector.h.


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

Generated on Mon Jan 28 00:30:22 2013 for HDK by  doxygen 1.5.9