TRF Language Model
wb::VecShell< T > Class Template Reference

#include <wb-mat.h>

Inheritance diagram for wb::VecShell< T >:
wb::Vec< T >

Public Member Functions

 VecShell ()
 
 VecShell (T *p, int size)
 
void Fill (T v)
 
T * GetBuf () const
 
int GetSize () const
 
int ByteSize () const
 
VecShell< T > GetSub (int nPos, int nLen)
 
void Reset (T *p, int size)
 
T & operator[] (int i)
 
void operator= (VecShell v)
 
void operator+= (VecShell v)
 
void operator-= (VecShell v)
 
void operator*= (T n)
 
void operator/= (T n)
 
bool operator== (VecShell v)
 
Sum ()
 

Protected Attributes

T * m_pBuf
 buf pointer More...
 
int m_nSize
 buf size More...
 

Friends

bool VecEqual (VecShell< T > &v1, VecShell< T > &v2)
 define the friend function More...
 
void VecAdd (VecShell< T > &res, VecShell< T > &v1, VecShell< T > &v2)
 calculate V + V More...
 
VecDot (VecShell< T > &v1, VecShell< T > &v2)
 calculate V*V More...
 
MatVec2 (MatShell< T > &m, VecShell< T > &v1, VecShell< T > &v2)
 calculate V1*M*V2 More...
 

Detailed Description

template<class T>
class wb::VecShell< T >

Definition at line 27 of file wb-mat.h.

Constructor & Destructor Documentation

§ VecShell() [1/2]

template<class T>
wb::VecShell< T >::VecShell ( )
inline

Definition at line 65 of file wb-mat.h.

§ VecShell() [2/2]

template<class T>
wb::VecShell< T >::VecShell ( T *  p,
int  size 
)
inline

Definition at line 66 of file wb-mat.h.

Member Function Documentation

§ ByteSize()

template<class T>
int wb::VecShell< T >::ByteSize ( ) const
inline

Definition at line 70 of file wb-mat.h.

§ GetBuf()

template<class T>
T* wb::VecShell< T >::GetBuf ( ) const
inline

Definition at line 68 of file wb-mat.h.

§ GetSize()

template<class T>
int wb::VecShell< T >::GetSize ( ) const
inline

Definition at line 69 of file wb-mat.h.

§ GetSub()

template<class T>
VecShell<T> wb::VecShell< T >::GetSub ( int  nPos,
int  nLen 
)
inline

Definition at line 71 of file wb-mat.h.

§ Reset()

template<class T>
void wb::VecShell< T >::Reset ( T *  p,
int  size 
)
inline

Definition at line 72 of file wb-mat.h.

§ Sum()

template<class T>
T wb::VecShell< T >::Sum ( )
inline

Definition at line 81 of file wb-mat.h.

Friends And Related Function Documentation

§ MatVec2

template<class T>
T MatVec2 ( MatShell< T > &  m,
VecShell< T > &  v1,
VecShell< T > &  v2 
)
friend

calculate V1*M*V2

Definition at line 251 of file wb-mat.h.

§ VecAdd

template<class T>
void VecAdd ( VecShell< T > &  res,
VecShell< T > &  v1,
VecShell< T > &  v2 
)
friend

calculate V + V

Definition at line 223 of file wb-mat.h.

§ VecDot

template<class T>
T VecDot ( VecShell< T > &  v1,
VecShell< T > &  v2 
)
friend

calculate V*V

Definition at line 235 of file wb-mat.h.

§ VecEqual

template<class T>
bool VecEqual ( VecShell< T > &  v1,
VecShell< T > &  v2 
)
friend

define the friend function

Definition at line 210 of file wb-mat.h.

Member Data Documentation

§ m_nSize

template<class T>
int wb::VecShell< T >::m_nSize
protected

buf size

Definition at line 63 of file wb-mat.h.

§ m_pBuf

template<class T>
T* wb::VecShell< T >::m_pBuf
protected

buf pointer

Definition at line 62 of file wb-mat.h.


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