TRF Language Model
|
Namespaces | |
wb::iter | |
Classes | |
class | wb::_wb_HEAP_UNIT_< TValue, TWeight > |
heap unit More... | |
class | wb::Heap< TValue, TWeight > |
heap More... | |
class | wb::vIter< T > |
class | wb::LHash< KeyT, DataT > |
a linear hash table More... | |
class | wb::LHashIter< KeyT, DataT > |
the iter of LHash More... | |
class | wb::VecShell< T > |
class | wb::Vec< T > |
class | wb::MatShell< T > |
class | wb::Mat< T > |
class | wb::Mat3dShell |
class | wb::Mat3d |
class | wb::String |
a dynamic string class More... | |
class | wb::Trie< KeyT, DataT > |
trie structure More... | |
class | wb::TrieIter< KeyT, DataT > |
iter all the sub-tries More... | |
class | wb::TrieIter2< KeyT, DataT > |
Get all the values whose indexes are of a fixed length. The returned tries may not contain a legal values. More... | |
class | wb::Vector< T > |
this is the basic class of Array/Stack/Queue. Realize the dynamic memory management More... | |
class | wb::Array< T > |
Dynamic array. More... | |
class | wb::DArray< T > |
2-dimension array. More... | |
class | wb::Stack< T > |
A dynamic stack. More... | |
class | wb::Queue< T > |
A queue based the dynamic memory mangement. More... | |
class | wb::CirQueue< T > |
Circular queue. More... | |
Functions | |
template<class T > | |
bool | wb::VecEqual (VecShell< T > &v1, VecShell< T > &v2) |
calculate V==V More... | |
template<class T > | |
void | wb::VecAdd (VecShell< T > &res, VecShell< T > &v1, VecShell< T > &v2) |
calculate V + V More... | |
template<class T > | |
T | wb::VecDot (VecShell< T > &v1, VecShell< T > &v2) |
calculate V*V More... | |
template<class T > | |
T | wb::MatVec2 (MatShell< T > &m, VecShell< T > &v1, VecShell< T > &v2) |
calculate V1*M*V2 More... | |
template<typename T > | |
double | wb::VecNorm (T *pVec, int len) |
[Vec-function] sqrt(v*v^T); More... | |
template<typename T > | |
double | wb::VecDot (T *pVec1, T *pVec2, int len) |
[Vec-function] v1*v2^T More... | |
template<typename T > | |
double | wb::VecDiff (T *pVec1, T *pVec2, int len) |
[Vec-function] |v1-v2| More... | |
template<typename T > | |
double | wb::VecAngle (T *pVec1, T *pVec2, int len) |
[Vec-function] the cos of the angle of v1 and v2 More... | |
template<typename T > | |
void | wb::VecUnfold (const char *pStr, Array< T > &a) |
[Vec-function] transform the matlab-style vector to a array, such as [1,3:1:7,9] => 1,3,4,5,6,7,9 More... | |
template<typename T > | |
int | wb::Compar_Inc (const T &a, const T &b) |
comparing function for increase sort. More... | |
template<typename T > | |
int | wb::Compar_Dec (const T &a, const T &b) |
comparing function for decrease sort More... | |
template<typename T > | |
void | wb::Qsort (T *p, int low, int high, int(*compar)(const T &, const T &)=Compar_Inc) |
Quick sork. More... | |
template<typename T > | |
void | wb::Qsort (Array< T > &a, int(*compar)(const T &, const T &)=Compar_Inc) |
Quick sork, redefine for class Array. More... | |
void | wb::VecShell< T >::Fill (T v) |
T & | wb::VecShell< T >::operator[] (int i) |
void | wb::VecShell< T >::operator= (VecShell v) |
void | wb::VecShell< T >::operator+= (VecShell v) |
void | wb::VecShell< T >::operator-= (VecShell v) |
void | wb::VecShell< T >::operator*= (T n) |
void | wb::VecShell< T >::operator/= (T n) |
bool | wb::VecShell< T >::operator== (VecShell v) |
void | wb::Vec< T >::Reset (int size=0) |
void | wb::Vec< T >::Copy (VecShell< T > v) |
void | wb::MatShell< T >::Fill (T v) |
bool | wb::MatShell< T >::operator== (MatShell &m) |
void | wb::MatShell< T >::Write (File &file) |
void | wb::MatShell< T >::Read (File &file) |
void | wb::Mat< T >::Reset (int row=0, int col=0) |
void | wb::Mat< T >::Copy (MatShell< T > &m) |
void | wb::Mat3dShell::Fill (T v) |
void | wb::Mat3dShell::Write (File &file) |
void | wb::Mat3dShell::Read (File &file) |
bool | wb::Mat3dShell::operator== (Mat3dShell &m) |
void | wb::Mat3d::Reset (int xdim=0, int ydim=0, int zdim=0) |
void | wb::Mat3d::Copy (Mat3dShell< T > &m) |
In this module, we defined some useful data structures which will be applied in the algorithm:
Mat/Vec: an application of matrix calculation
Heap: an application of Max-Heap or Min-Heap, used to commit a heap sort.
Lhash: linear hash table, the size will dynamically adjust when elements are added/deleted
Trie: a prefix tree structure. For the children of a same node, the keys are of the same prefix(the key of their parent)
int wb::Compar_Dec | ( | const T & | a, |
const T & | b | ||
) |
comparing function for decrease sort
Definition at line 664 of file wb-vector.h.
int wb::Compar_Inc | ( | const T & | a, |
const T & | b | ||
) |
comparing function for increase sort.
Definition at line 657 of file wb-vector.h.
void wb::Mat3d::Copy | ( | Mat3dShell< T > & | m | ) |
void wb::VecShell< T >::Fill | ( | T | v | ) |
void wb::MatShell< T >::Fill | ( | T | v | ) |
void wb::VecShell< T >::operator*= | ( | T | n | ) |
void wb::VecShell< T >::operator+= | ( | VecShell< T > | v | ) |
void wb::VecShell< T >::operator-= | ( | VecShell< T > | v | ) |
void wb::VecShell< T >::operator/= | ( | T | n | ) |
void wb::VecShell< T >::operator= | ( | VecShell< T > | v | ) |
bool wb::VecShell< T >::operator== | ( | VecShell< T > | v | ) |
bool wb::MatShell< T >::operator== | ( | MatShell< T > & | m | ) |
bool wb::Mat3dShell::operator== | ( | Mat3dShell & | m | ) |
T & wb::VecShell< T >::operator[] | ( | int | i | ) |
void wb::Qsort | ( | T * | p, |
int | low, | ||
int | high, | ||
int(*)(const T &, const T &) | compar = Compar_Inc |
||
) |
Quick sork.
Definition at line 678 of file wb-vector.h.
void wb::Qsort | ( | Array< T > & | a, |
int(*)(const T &, const T &) | compar = Compar_Inc |
||
) |
Quick sork, redefine for class Array.
Definition at line 711 of file wb-vector.h.
void wb::MatShell< T >::Read | ( | File & | file | ) |
void wb::Vec< T >::Reset | ( | int | size = 0 | ) |
void wb::Mat< T >::Reset | ( | int | row = 0 , |
int | col = 0 |
||
) |
void wb::Mat3d::Reset | ( | int | xdim = 0 , |
int | ydim = 0 , |
||
int | zdim = 0 |
||
) |
double wb::VecAngle | ( | T * | pVec1, |
T * | pVec2, | ||
int | len | ||
) |
[Vec-function] the cos of the angle of v1 and v2
Definition at line 601 of file wb-vector.h.
double wb::VecDiff | ( | T * | pVec1, |
T * | pVec2, | ||
int | len | ||
) |
[Vec-function] |v1-v2|
Definition at line 591 of file wb-vector.h.
double wb::VecDot | ( | T * | pVec1, |
T * | pVec2, | ||
int | len | ||
) |
[Vec-function] v1*v2^T
Definition at line 581 of file wb-vector.h.
double wb::VecNorm | ( | T * | pVec, |
int | len | ||
) |
[Vec-function] sqrt(v*v^T);
Definition at line 571 of file wb-vector.h.
void wb::VecUnfold | ( | const char * | pStr, |
Array< T > & | a | ||
) |
[Vec-function] transform the matlab-style vector to a array, such as [1,3:1:7,9] => 1,3,4,5,6,7,9
Definition at line 608 of file wb-vector.h.
void wb::MatShell< T >::Write | ( | File & | file | ) |