SHOGUN v0.9.0
公有成员 | 公有属性 | 保护属性
CTrie< Trie >模板类参考

详细描述

template<class Trie>
class shogun::CTrie< Trie >

在文件Trie.h156行定义。

继承图,类CTrie< Trie >
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CTrie ()
 CTrie (int32_t d, bool p_use_compact_terminal_nodes=true)
 CTrie (const CTrie &to_copy)
virtual ~CTrie ()
const CTrieoperator= (const CTrie &to_copy)
bool compare_traverse (int32_t node, const CTrie &other, int32_t other_node)
bool compare (const CTrie &other)
bool find_node (int32_t node, int32_t *trace, int32_t &trace_len) const
int32_t find_deepest_node (int32_t start_node, int32_t &deepest_node) const
void display_node (int32_t node) const
void destroy ()
void set_degree (int32_t d)
void create (int32_t len, bool p_use_compact_terminal_nodes=true)
void delete_trees (bool p_use_compact_terminal_nodes=true)
void add_to_trie (int32_t i, int32_t seq_offset, int32_t *vec, float32_t alpha, float64_t *weights, bool degree_times_position_weights)
float64_t compute_abs_weights_tree (int32_t tree, int32_t depth)
float64_tcompute_abs_weights (int32_t &len)
float64_t compute_by_tree_helper (int32_t *vec, int32_t len, int32_t seq_pos, int32_t tree_pos, int32_t weight_pos, float64_t *weights, bool degree_times_position_weights)
void compute_by_tree_helper (int32_t *vec, int32_t len, int32_t seq_pos, int32_t tree_pos, int32_t weight_pos, float64_t *LevelContrib, float64_t factor, int32_t mkl_stepsize, float64_t *weights, bool degree_times_position_weights)
void compute_scoring_helper (int32_t tree, int32_t i, int32_t j, float64_t weight, int32_t d, int32_t max_degree, int32_t num_feat, int32_t num_sym, int32_t sym_offset, int32_t offs, float64_t *result)
void add_example_to_tree_mismatch_recursion (int32_t tree, int32_t i, float64_t alpha, int32_t *vec, int32_t len_rem, int32_t degree_rec, int32_t mismatch_rec, int32_t max_mismatch, float64_t *weights)
void traverse (int32_t tree, const int32_t p, struct TreeParseInfo info, const int32_t depth, int32_t *const x, const int32_t k)
void count (const float64_t w, const int32_t depth, const struct TreeParseInfo info, const int32_t p, int32_t *x, const int32_t k)
int32_t compact_nodes (int32_t start_node, int32_t depth, float64_t *weights)
float64_t get_cumulative_score (int32_t pos, uint64_t seq, int32_t deg, float64_t *weights)
void fill_backtracking_table_recursion (Trie *tree, int32_t depth, uint64_t seq, float64_t value, DynArray< ConsensusEntry > *table, float64_t *weights)
void fill_backtracking_table (int32_t pos, DynArray< ConsensusEntry > *prev, DynArray< ConsensusEntry > *cur, bool cumulative, float64_t *weights)
void POIMs_extract_W (float64_t *const *const W, const int32_t K)
void POIMs_precalc_SLR (const float64_t *const distrib)
void POIMs_get_SLR (const int32_t parentIdx, const int32_t sym, const int32_t depth, float64_t *S, float64_t *L, float64_t *R)
void POIMs_add_SLR (float64_t *const *const poims, const int32_t K, const int32_t debug)
bool get_use_compact_terminal_nodes ()
void set_use_compact_terminal_nodes (bool p_use_compact_terminal_nodes)
int32_t get_num_used_nodes ()
void set_position_weights (const float64_t *p_position_weights)
int32_t get_node (bool last_node=false)
void check_treemem ()
void set_weights_in_tree (bool weights_in_tree_)
bool get_weights_in_tree ()
void POIMs_extract_W_helper (const int32_t nodeIdx, const int32_t depth, const int32_t offset, const int32_t y0, float64_t *const *const W, const int32_t K)
void POIMs_calc_SLR_helper1 (const float64_t *const distrib, const int32_t i, const int32_t nodeIdx, int32_t left_tries_idx[4], const int32_t depth, int32_t const lastSym, float64_t *S, float64_t *L, float64_t *R)
void POIMs_calc_SLR_helper2 (const float64_t *const distrib, const int32_t i, const int32_t nodeIdx, int32_t left_tries_idx[4], const int32_t depth, float64_t *S, float64_t *L, float64_t *R)
void POIMs_add_SLR_helper1 (const int32_t nodeIdx, const int32_t depth, const int32_t i, const int32_t y0, float64_t *const *const poims, const int32_t K, const int32_t debug)
void POIMs_add_SLR_helper2 (float64_t *const *const poims, const int32_t K, const int32_t k, const int32_t i, const int32_t y, const float64_t valW, const float64_t valS, const float64_t valL, const float64_t valR, const int32_t debug)
virtual const char * get_name () const
template<>
void POIMs_extract_W_helper (const int32_t nodeIdx, const int32_t depth, const int32_t offset, const int32_t y0, float64_t *const *const W, const int32_t K)
template<>
void POIMs_extract_W (float64_t *const *const W, const int32_t K)
template<>
void POIMs_calc_SLR_helper1 (const float64_t *const distrib, const int32_t i, const int32_t nodeIdx, int32_t left_tries_idx[4], const int32_t depth, int32_t const lastSym, float64_t *S, float64_t *L, float64_t *R)
template<>
void POIMs_calc_SLR_helper2 (const float64_t *const distrib, const int32_t i, const int32_t nodeIdx, int32_t left_tries_idx[4], const int32_t depth, float64_t *S, float64_t *L, float64_t *R)
template<>
void POIMs_precalc_SLR (const float64_t *const distrib)
template<>
void POIMs_get_SLR (const int32_t parentIdx, const int32_t sym, const int32_t depth, float64_t *S, float64_t *L, float64_t *R)
template<>
void POIMs_add_SLR_helper2 (float64_t *const *const poims, const int32_t K, const int32_t k, const int32_t i, const int32_t y, const float64_t valW, const float64_t valS, const float64_t valL, const float64_t valR, const int32_t debug)
template<>
void POIMs_add_SLR_helper1 (const int32_t nodeIdx, const int32_t depth, const int32_t i, const int32_t y0, float64_t *const *const poims, const int32_t K, const int32_t debug)
template<>
void POIMs_add_SLR (float64_t *const *const poims, const int32_t K, const int32_t debug)

公有属性

int32_t NUM_SYMS

保护属性

int32_t length
int32_t * trees
int32_t degree
float64_t const * position_weights
Trie * TreeMem
int32_t TreeMemPtr
int32_t TreeMemPtrMax
bool use_compact_terminal_nodes
bool weights_in_tree
int32_t * nofsKmers

构造及析构函数文档

CTrie ( )

default constructor

在文件Trie.h663行定义。

CTrie ( int32_t  d,
bool  p_use_compact_terminal_nodes = true 
)

constructor

参数:
ddegree
p_use_compact_terminal_nodesif compact terminal nodes shall be used

在文件Trie.h680行定义。

CTrie ( const CTrie< Trie > &  to_copy)

copy constructor

在文件Trie.h696行定义。

~CTrie ( ) [virtual]

在文件Trie.h1129行定义。


成员函数文档

void add_example_to_tree_mismatch_recursion ( int32_t  tree,
int32_t  i,
float64_t  alpha,
int32_t *  vec,
int32_t  len_rem,
int32_t  degree_rec,
int32_t  mismatch_rec,
int32_t  max_mismatch,
float64_t weights 
)

add example to tree mismatch recursion

参数:
treetree
ii
alphaalpha
vecvector
len_remlength of rem
degree_recdegree rec
mismatch_recmismatch rec
max_mismatchmaximum mismatch
weightsweights

在文件Trie.h1235行定义。

void add_to_trie ( int32_t  i,
int32_t  seq_offset,
int32_t *  vec,
float32_t  alpha,
float64_t weights,
bool  degree_times_position_weights 
)

add to trie

参数:
ii
seq_offsetsequence offset
vecvector
alphaalpha
weightsweights
degree_times_position_weightsif degree times position weights shall be applied

在文件Trie.h1497行定义。

void check_treemem ( )

check tree memory usage

在文件Trie.h517行定义。

int32_t compact_nodes ( int32_t  start_node,
int32_t  depth,
float64_t weights 
)

compact nodes

参数:
start_nodestart node
depthdepth
weightsweights

在文件Trie.h815行定义。

bool compare ( const CTrie< Trie > &  other)

compare

参数:
otherother trie
返回:
if comparison was successful
bool compare_traverse ( int32_t  node,
const CTrie< Trie > &  other,
int32_t  other_node 
)

compare traverse

参数:
nodenode
otherother trie
other_nodeother node
返回:
if comparison was successful
float64_t * compute_abs_weights ( int32_t &  len)

compute absolute weights

参数:
lenlength
返回:
computed absolute weights

在文件Trie.h1215行定义。

float64_t compute_abs_weights_tree ( int32_t  tree,
int32_t  depth 
)

compute absolute weights tree

参数:
treetree to compute for
depthdepth
返回:
computed absolute weights tree

在文件Trie.h1186行定义。

float64_t compute_by_tree_helper ( int32_t *  vec,
int32_t  len,
int32_t  seq_pos,
int32_t  tree_pos,
int32_t  weight_pos,
float64_t weights,
bool  degree_times_position_weights 
)

compute by tree helper

参数:
vecvector
lenlength
seq_possequence position
tree_postree position
weight_posweight position
weights
degree_times_position_weightsif degree times position weights shall be applied
返回:
a computed value

在文件Trie.h1723行定义。

void compute_by_tree_helper ( int32_t *  vec,
int32_t  len,
int32_t  seq_pos,
int32_t  tree_pos,
int32_t  weight_pos,
float64_t LevelContrib,
float64_t  factor,
int32_t  mkl_stepsize,
float64_t weights,
bool  degree_times_position_weights 
)

compute by tree helper

参数:
vecvector
lenlength
seq_possequence position
tree_postree position
weight_posweight position
LevelContriblevel contribution
factorfactor
mkl_stepsizeMKL stepsize
weights
degree_times_position_weightsif degree times position weights shall be applied

在文件Trie.h1798行定义。

void compute_scoring_helper ( int32_t  tree,
int32_t  i,
int32_t  j,
float64_t  weight,
int32_t  d,
int32_t  max_degree,
int32_t  num_feat,
int32_t  num_sym,
int32_t  sym_offset,
int32_t  offs,
float64_t result 
)

compute scoring helper

参数:
treetree
ii
jj
weightweight
ddegree
max_degreemaximum degree
num_featnumber of features
num_symnumber of symbols
sym_offsetsymbol offset
offsoffsets
resultresult

在文件Trie.h1348行定义。

void count ( const float64_t  w,
const int32_t  depth,
const struct TreeParseInfo  info,
const int32_t  p,
int32_t *  x,
const int32_t  k 
)

count

参数:
ww
depthdepth
infotree parse info
pp
xx
k

在文件Trie.h1443行定义。

void create ( int32_t  len,
bool  p_use_compact_terminal_nodes = true 
)

create

参数:
lenlength of new trie
p_use_compact_terminal_nodesif compact terminal nodes shall be used

在文件Trie.h1157行定义。

void delete_trees ( bool  p_use_compact_terminal_nodes = true)

delete trees

参数:
p_use_compact_terminal_nodesif compact terminal nodes shall be used

在文件Trie.h1172行定义。

void destroy ( )

destroy

在文件Trie.h1136行定义。

void display_node ( int32_t  node) const

display node

参数:
nodenode to display

在文件Trie.h1065行定义。

void fill_backtracking_table ( int32_t  pos,
DynArray< ConsensusEntry > *  prev,
DynArray< ConsensusEntry > *  cur,
bool  cumulative,
float64_t weights 
)

fill backtracking table

参数:
posposition
prevprevious concencus entry
curcurrent concensus entry
cumulativeif is cumulative
weightsweights

在文件Trie.h2088行定义。

void fill_backtracking_table_recursion ( Trie *  tree,
int32_t  depth,
uint64_t  seq,
float64_t  value,
DynArray< ConsensusEntry > *  table,
float64_t weights 
)

fill backtracking table recursion

参数:
treetree
depthdepth
seqsequence
valuevalue
tabletable of concensus entries
weightsweights

在文件Trie.h2014行定义。

int32_t find_deepest_node ( int32_t  start_node,
int32_t &  deepest_node 
) const

find deepest node

参数:
start_nodestart node
deepest_nodedeepest node will be stored in here
返回:
depth of deepest node

在文件Trie.h758行定义。

bool find_node ( int32_t  node,
int32_t *  trace,
int32_t &  trace_len 
) const

find node

参数:
nodenode to find
tracetrace
trace_lenlength of trace

在文件Trie.h1024行定义。

float64_t get_cumulative_score ( int32_t  pos,
uint64_t  seq,
int32_t  deg,
float64_t weights 
)

get cumulative score

参数:
posposition
seqsequence
degdegree
weightsweights
返回:
cumulative score

在文件Trie.h2056行定义。

virtual const char* get_name ( void  ) const [virtual]
返回:
object name

实现了CSGObject

在文件Trie.h630行定义。

int32_t get_node ( bool  last_node = false)

get node

返回:
node

在文件Trie.h493行定义。

int32_t get_num_used_nodes ( )

get number of used nodes

返回:
number of used nodes

在文件Trie.h475行定义。

bool get_use_compact_terminal_nodes ( )

get use compact terminal nodes

返回:
if compact terminal nodes are used

在文件Trie.h455行定义。

bool get_weights_in_tree ( )

get weights in tree

返回:
if weights are in tree

在文件Trie.h543行定义。

const CTrie& operator= ( const CTrie< Trie > &  to_copy)

overload operator =

void POIMs_add_SLR ( float64_t *const *const  poims,
const int32_t  K,
const int32_t  debug 
)

在文件Trie.cpp412行定义。

void POIMs_add_SLR ( float64_t *const *const  poims,
const int32_t  K,
const int32_t  debug 
)

POIMs add SLR

参数:
poimsPOIMs
KK
debugdebug level
void POIMs_add_SLR_helper1 ( const int32_t  nodeIdx,
const int32_t  depth,
const int32_t  i,
const int32_t  y0,
float64_t *const *const  poims,
const int32_t  K,
const int32_t  debug 
)

POIMs add SLR helper 1

参数:
nodeIdxnode index
depthdepth
ii
y0y0
poimsPOIMs
KK
debugdebug level
void POIMs_add_SLR_helper1 ( const int32_t  nodeIdx,
const int32_t  depth,
const int32_t  i,
const int32_t  y0,
float64_t *const *const  poims,
const int32_t  K,
const int32_t  debug 
)

在文件Trie.cpp355行定义。

void POIMs_add_SLR_helper2 ( float64_t *const *const  poims,
const int32_t  K,
const int32_t  k,
const int32_t  i,
const int32_t  y,
const float64_t  valW,
const float64_t  valS,
const float64_t  valL,
const float64_t  valR,
const int32_t  debug 
)

在文件Trie.cpp294行定义。

void POIMs_add_SLR_helper2 ( float64_t *const *const  poims,
const int32_t  K,
const int32_t  k,
const int32_t  i,
const int32_t  y,
const float64_t  valW,
const float64_t  valS,
const float64_t  valL,
const float64_t  valR,
const int32_t  debug 
)

POIMs add SLR helper 2

参数:
poimsPOIMs
KK
kk
ii
yy
valWvalue W
valSvalue S
valLvalue L
valRvalue R
debugdebug level
void POIMs_calc_SLR_helper1 ( const float64_t *const  distrib,
const int32_t  i,
const int32_t  nodeIdx,
int32_t  left_tries_idx[4],
const int32_t  depth,
int32_t const  lastSym,
float64_t S,
float64_t L,
float64_t R 
)

POIMs calc SLR helper

参数:
distribdistribution
ii
nodeIdxnode index
left_tries_idxleft tries index
depthdepth
lastSymlast symbol
SS
LL
RR
void POIMs_calc_SLR_helper1 ( const float64_t *const  distrib,
const int32_t  i,
const int32_t  nodeIdx,
int32_t  left_tries_idx[4],
const int32_t  depth,
int32_t const  lastSym,
float64_t S,
float64_t L,
float64_t R 
)

在文件Trie.cpp74行定义。

void POIMs_calc_SLR_helper2 ( const float64_t *const  distrib,
const int32_t  i,
const int32_t  nodeIdx,
int32_t  left_tries_idx[4],
const int32_t  depth,
float64_t S,
float64_t L,
float64_t R 
)

在文件Trie.cpp134行定义。

void POIMs_calc_SLR_helper2 ( const float64_t *const  distrib,
const int32_t  i,
const int32_t  nodeIdx,
int32_t  left_tries_idx[4],
const int32_t  depth,
float64_t S,
float64_t L,
float64_t R 
)

POIMs calc SLR helper 2

参数:
distribdistribution
ii
nodeIdxnode index
left_tries_idxleft tries index
depthdepth
SS
LL
RR
void POIMs_extract_W ( float64_t *const *const  W,
const int32_t  K 
)

POIMs extract W

参数:
WW
KK
void POIMs_extract_W ( float64_t *const *const  W,
const int32_t  K 
)

在文件Trie.cpp60行定义。

void POIMs_extract_W_helper ( const int32_t  nodeIdx,
const int32_t  depth,
const int32_t  offset,
const int32_t  y0,
float64_t *const *const  W,
const int32_t  K 
)

在文件Trie.cpp19行定义。

void POIMs_extract_W_helper ( const int32_t  nodeIdx,
const int32_t  depth,
const int32_t  offset,
const int32_t  y0,
float64_t *const *const  W,
const int32_t  K 
)

POIMs extract W helper

参数:
nodeIdxnode index
depthdepth
offsetoffset
y0y0
WW
KK
void POIMs_get_SLR ( const int32_t  parentIdx,
const int32_t  sym,
const int32_t  depth,
float64_t S,
float64_t L,
float64_t R 
)

在文件Trie.cpp272行定义。

void POIMs_get_SLR ( const int32_t  parentIdx,
const int32_t  sym,
const int32_t  depth,
float64_t S,
float64_t L,
float64_t R 
)

POIMs get SLR

参数:
parentIdxparent index
symsymbol
depthdepth
Swill point to S
Lwill point to L
Rwill point to R
void POIMs_precalc_SLR ( const float64_t *const  distrib)

在文件Trie.cpp245行定义。

void POIMs_precalc_SLR ( const float64_t *const  distrib)

POIMs precalc SLR

参数:
distribdistribution
void set_degree ( int32_t  d)

set degree

参数:
dnew degree

在文件Trie.h1151行定义。

void set_position_weights ( const float64_t p_position_weights)

set position weights

参数:
p_position_weightsnew position weights

在文件Trie.h484行定义。

void set_use_compact_terminal_nodes ( bool  p_use_compact_terminal_nodes)

set use compact terminal nodes

参数:
p_use_compact_terminal_nodesif compact terminal nodes shall be used

在文件Trie.h465行定义。

void set_weights_in_tree ( bool  weights_in_tree_)

set weights in tree

参数:
weights_in_tree_if weights shall be in tree

在文件Trie.h534行定义。

void traverse ( int32_t  tree,
const int32_t  p,
struct TreeParseInfo  info,
const int32_t  depth,
int32_t *const  x,
const int32_t  k 
)

traverse

参数:
treetree
pp
infotree parse info
depthdepth
xx
kk

在文件Trie.h1393行定义。


成员数据文档

int32_t degree [protected]

degree

在文件Trie.h643行定义。

int32_t length [protected]

length

在文件Trie.h638行定义。

int32_t* nofsKmers [protected]

nofsKmers

在文件Trie.h660行定义。

int32_t NUM_SYMS

number of symbols

在文件Trie.h634行定义。

float64_t const* position_weights [protected]

position weights

在文件Trie.h645行定义。

Trie* TreeMem [protected]

tree memory

在文件Trie.h648行定义。

int32_t TreeMemPtr [protected]

tree memory pointer

在文件Trie.h650行定义。

int32_t TreeMemPtrMax [protected]

tree memory pointer maximum

在文件Trie.h652行定义。

int32_t* trees [protected]

trees

在文件Trie.h640行定义。

bool use_compact_terminal_nodes [protected]

if compact terminal nodes are used

在文件Trie.h654行定义。

bool weights_in_tree [protected]

if weights are in tree

在文件Trie.h657行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation