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

2-dimension array. More...

#include <wb-vector.h>

Inheritance diagram for wb::DArray< T >:
wb::Vector< T >

Public Member Functions

 DArray (int x_size=DEFAULE_VECTOR_SIZE, int y_size=DEFAULE_VECTOR_SIZE)
 constructor More...
 
T & Get (int i, int j)
 Get the value at position i row and j column. More...
 
- Public Member Functions inherited from wb::Vector< T >
 Vector (int size=DEFAULE_VECTOR_SIZE)
 constructor, do not init the memeory to zero. More...
 
 ~Vector ()
 desturctor More...
 
int Size () const
 get the memory size More...
 
T * GetBuffer (int i=0) const
 get the buffer pointer More...
 
T & Get (int i)
 get the value at position i More...
 
int Size2Bits (int size)
 Transform the size to bit. More...
 
void Fill (T m)
 set all the values to m More...
 
void Zero ()
 Fill all the memory to ZERO. call 'memset'. More...
 
void Copy (const Vector< T > &vector)
 Copy a vector to another, using '=' to set values. More...
 
void MemCopy (Vector< T > &vector)
 Copy a vector to another, using 'memcpy' to set values. More...
 
void BufferOutside (T *&p_pt)
 Set the buffer pointer to p_pt, and re-init the vector. More...
 

Public Attributes

int m_nXDim
 x-dim More...
 
int m_nYDim
 

Additional Inherited Members

- Protected Attributes inherited from wb::Vector< T >
T * m_pBuffer
 buffer pointer More...
 
int m_nBits
 bit number of memory size More...
 

Detailed Description

template<typename T>
class wb::DArray< T >

2-dimension array.

Date
2016-04-28
Author
WangBin

Definition at line 356 of file wb-vector.h.

Constructor & Destructor Documentation

§ DArray()

template<typename T >
wb::DArray< T >::DArray ( int  x_size = DEFAULE_VECTOR_SIZE,
int  y_size = DEFAULE_VECTOR_SIZE 
)
inline

constructor

Definition at line 362 of file wb-vector.h.

Member Function Documentation

§ Get()

template<typename T >
T& wb::DArray< T >::Get ( int  i,
int  j 
)
inline

Get the value at position i row and j column.

Definition at line 368 of file wb-vector.h.

Member Data Documentation

§ m_nXDim

template<typename T >
int wb::DArray< T >::m_nXDim

x-dim

Definition at line 359 of file wb-vector.h.

§ m_nYDim

template<typename T >
int wb::DArray< T >::m_nYDim

y-dim

Definition at line 360 of file wb-vector.h.


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