Dynamic Programming Class.
Structure and Function collection. This Class implements a Dynamic Programming functions.
Definition at line 47 of file DynProg.h.
Classes | |
struct | segment_loss_struct |
segment loss More... | |
struct | svm_values_struct |
SVM values. More... | |
Public Member Functions | |
CDynProg (int32_t p_num_svms=8) | |
virtual | ~CDynProg () |
float64_t | best_path_no_b (int32_t max_iter, int32_t &best_iter, int32_t *my_path) |
void | best_path_no_b_trans (int32_t max_iter, int32_t &max_best_iter, int16_t nbest, float64_t *prob_nbest, int32_t *my_paths) |
void | set_num_states (int32_t p_N) |
int32_t | get_num_states () |
int32_t | get_num_svms () |
void | init_content_svm_value_array (const int32_t p_num_svms, const int32_t seq_len) |
void | init_tiling_data (int32_t *probe_pos, float64_t *intensities, const int32_t num_probes, const int32_t seq_len) |
void | precompute_tiling_plifs (CPlif **PEN, const int32_t *tiling_plif_ids, const int32_t num_tiling_plifs, const int32_t seq_len, const int32_t *pos) |
void | resize_lin_feat (int32_t num_new_feat, int32_t seq_len) |
void | set_p_vector (float64_t *p, int32_t N) |
void | set_q_vector (float64_t *q, int32_t N) |
void | set_a (float64_t *a, int32_t M, int32_t N) |
void | set_a_id (int32_t *a, int32_t M, int32_t N) |
void | set_a_trans_matrix (float64_t *a_trans, int32_t num_trans, int32_t N) |
void | init_svm_arrays (int32_t p_num_degrees, int32_t p_num_svms) |
void | init_word_degree_array (int32_t *p_word_degree_array, int32_t num_elem) |
void | init_cum_num_words_array (int32_t *p_cum_num_words_array, int32_t num_elem) |
void | init_num_words_array (int32_t *p_num_words_array, int32_t num_elem) |
void | init_mod_words_array (int32_t *p_mod_words_array, int32_t num_elem, int32_t num_columns) |
void | init_sign_words_array (bool *p_sign_words_array, int32_t num_elem) |
void | init_string_words_array (int32_t *p_string_words_array, int32_t num_elem) |
bool | check_svm_arrays () |
void | best_path_set_seq (float64_t *seq, int32_t N, int32_t seq_len) |
void | best_path_set_seq3d (float64_t *seq, int32_t p_N, int32_t seq_len, int32_t max_num_signals) |
void | best_path_set_pos (int32_t *pos, int32_t seq_len) |
void | best_path_set_orf_info (int32_t *orf_info, int32_t m, int32_t n) |
void | best_path_set_segment_sum_weights (float64_t *segment_sum_weights, int32_t num_states, int32_t seq_len) |
void | best_path_set_plif_list (CDynamicArray< CPlifBase * > *plifs) |
void | best_path_set_plif_id_matrix (int32_t *plif_id_matrix, int32_t m, int32_t n) |
void | best_path_set_plif_state_signal_matrix (int32_t *plif_id_matrix, int32_t m, int32_t n) |
void | best_path_set_genestr (char *genestr, int32_t genestr_len, int32_t genestr_num) |
void | best_path_set_my_state_seq (int32_t *my_state_seq, int32_t seq_len) |
void | best_path_set_my_pos_seq (int32_t *my_pos_seq, int32_t seq_len) |
void | best_path_set_single_genestr (char *genestr, int32_t genestr_len) |
void | best_path_set_dict_weights (float64_t *dictionary_weights, int32_t dict_len, int32_t n) |
void | best_path_set_segment_loss (float64_t *segment_loss, int32_t num_segment_id1, int32_t num_segment_id2) |
void | best_path_set_segment_ids_mask (int32_t *segment_ids, float64_t *segment_mask, int32_t m) |
void | best_path_call (int32_t nbest, bool use_orf) |
void | best_path_deriv_call () |
void | best_path_2struct_call (int32_t nbest) |
void | best_path_simple_call (int32_t nbest) |
void | best_path_deriv_call (int32_t nbest) |
void | best_path_get_scores (float64_t **scores, int32_t *n) |
void | best_path_get_states (int32_t **states, int32_t *m, int32_t *n) |
void | best_path_get_positions (int32_t **positions, int32_t *m, int32_t *n) |
void | best_path_get_losses (float64_t **my_losses, int32_t *seq_len) |
template<int16_t nbest, bool with_loss, bool with_multiple_sequences> | |
void | best_path_trans (const float64_t *seq, int32_t seq_len, const int32_t *pos, const int32_t *orf_info, CPlifBase **PLif_matrix, CPlifBase **Plif_state_signals, int32_t max_num_signals, int32_t genestr_num, float64_t *prob_nbest, int32_t *my_state_seq, int32_t *my_pos_seq, bool use_orf) |
void | best_path_trans_deriv (int32_t *my_state_seq, int32_t *my_pos_seq, float64_t *my_scores, float64_t *my_losses, int32_t my_seq_len, const float64_t *seq_array, int32_t seq_len, const int32_t *pos, CPlifBase **Plif_matrix, CPlifBase **Plif_state_signals, int32_t max_num_signals, int32_t genestr_num) |
void | best_path_2struct (const float64_t *seq, int32_t seq_len, const int32_t *pos, CPlifBase **Plif_matrix, const char *genestr, int32_t genestr_len, int16_t nbest, float64_t *prob_nbest, int32_t *my_state_seq, int32_t *my_pos_seq, float64_t *dictionary_weights, int32_t dict_len, float64_t *segment_sum_weights) |
void | best_path_trans_simple (const float64_t *seq, int32_t seq_len, int16_t nbest, float64_t *prob_nbest, int32_t *my_state_seq) |
T_STATES | get_N () const |
access function for number of states N | |
void | set_q (T_STATES offset, float64_t value) |
void | set_p (T_STATES offset, float64_t value) |
void | set_a (T_STATES line_, T_STATES column, float64_t value) |
float64_t | get_q (T_STATES offset) const |
float64_t | get_q_deriv (T_STATES offset) const |
float64_t | get_p (T_STATES offset) const |
float64_t | get_p_deriv (T_STATES offset) const |
void | precompute_content_values (uint16_t ***wordstr, const int32_t *pos, const int32_t num_cand_pos, const int32_t genestr_len, float64_t *dictionary_weights, int32_t dict_len) |
float64_t * | get_lin_feat (int32_t &dim1, int32_t &dim2) |
void | set_lin_feat (float64_t *p_lin_feat, int32_t p_num_svms, int32_t p_seq_len) |
void | create_word_string (const char *genestr, int32_t genestr_num, int32_t genestr_len, uint16_t ***wordstr) |
void | precompute_stop_codons (const char *genestr, int32_t genestr_len) |
void | set_genestr_len (int32_t genestr_len) |
float64_t | get_a (T_STATES line_, T_STATES column) const |
float64_t | get_a_deriv (T_STATES line_, T_STATES column) const |
Protected Member Functions | |
void | lookup_content_svm_values (const int32_t from_state, const int32_t to_state, const int32_t from_pos, const int32_t to_pos, float64_t *svm_values, int32_t frame) |
void | lookup_tiling_plif_values (const int32_t from_state, const int32_t to_state, const int32_t len, float64_t *svm_values) |
int32_t | find_frame (const int32_t from_state) |
int32_t | raw_intensities_interval_query (const int32_t from_pos, const int32_t to_pos, float64_t *intensities, int32_t type) |
void | translate_from_single_order (uint16_t *obs, int32_t sequence_length, int32_t start, int32_t order, int32_t max_val=2) |
void | reset_svm_value (int32_t pos, int32_t &last_svm_pos, float64_t *svm_value) |
void | extend_svm_value (uint16_t *wordstr, int32_t pos, int32_t &last_svm_pos, float64_t *svm_value) |
void | reset_segment_sum_value (int32_t num_states, int32_t pos, int32_t &last_segment_sum_pos, float64_t *segment_sum_value) |
void | extend_segment_sum_value (float64_t *segment_sum_weights, int32_t seqlen, int32_t num_states, int32_t pos, int32_t &last_segment_sum_pos, float64_t *segment_sum_value) |
void | init_svm_values (struct svm_values_struct &svs, int32_t start_pos, int32_t seqlen, int32_t howmuchlookback) |
void | clear_svm_values (struct svm_values_struct &svs) |
void | find_svm_values_till_pos (uint16_t ***wordstr, const int32_t *pos, int32_t t_end, struct svm_values_struct &svs) |
void | find_svm_values_till_pos (uint16_t **wordstr, const int32_t *pos, int32_t t_end, struct svm_values_struct &svs) |
void | update_svm_values_till_pos (uint16_t ***wordstr, const int32_t *pos, int32_t t_end, int32_t prev_t_end, struct svm_values_struct &svs) |
bool | extend_orf (int32_t orf_from, int32_t orf_to, int32_t start, int32_t &last_pos, int32_t to) |
void | init_segment_loss (struct segment_loss_struct &loss, int32_t seqlen, int32_t howmuchlookback) |
void | clear_segment_loss (struct segment_loss_struct &loss) |
float64_t | extend_segment_loss (struct segment_loss_struct &loss, const int32_t *pos_array, int32_t segment_id, int32_t pos, int32_t &last_pos, float64_t &last_value) |
void | find_segment_loss_till_pos (const int32_t *pos, int32_t t_end, CArray< int32_t > &segment_ids, CArray< float64_t > &segment_mask, struct segment_loss_struct &loss) |
virtual const char * | get_name () const |
Protected Attributes | |
CArray2< float64_t > | dict_weights |
float64_t * | dict_weights_array |
int32_t | num_degrees |
int32_t | num_svms |
int32_t | num_strings |
CArray< int32_t > | word_degree |
CArray< int32_t > | cum_num_words |
int32_t * | cum_num_words_array |
CArray< int32_t > | num_words |
int32_t * | num_words_array |
CArray2< int32_t > | mod_words |
int32_t * | mod_words_array |
CArray< bool > | sign_words |
bool * | sign_words_array |
CArray< int32_t > | string_words |
int32_t * | string_words_array |
CArray< int32_t > | svm_pos_start |
CArray< int32_t > | num_unique_words |
bool | svm_arrays_clean |
int32_t | num_svms_single |
int32_t | word_degree_single |
int32_t | cum_num_words_single |
int32_t | num_words_single |
CArray< bool > | word_used_single |
CArray< float64_t > | svm_value_unnormalized_single |
int32_t | num_unique_words_single |
int32_t | max_a_id |
int32_t | m_step |
int32_t | m_call |
CArray3< float64_t > | m_seq |
CArray< int32_t > | m_pos |
CArray2< int32_t > | m_orf_info |
CArray2< float64_t > | m_segment_sum_weights |
CArray< CPlifBase * > | m_plif_list |
CArray2< CPlifBase * > | m_PEN |
CArray2< CPlifBase * > | m_PEN_state_signals |
CArray2< char > | m_genestr |
CArray2< float64_t > | m_dict_weights |
CArray3< float64_t > | m_segment_loss |
CArray< int32_t > | m_segment_ids |
CArray< float64_t > | m_segment_mask |
CArray< int32_t > | m_my_state_seq |
CArray< int32_t > | m_my_pos_seq |
CArray< float64_t > | m_my_scores |
CArray< float64_t > | m_my_losses |
CArray< float64_t > | m_scores |
CArray2< int32_t > | m_states |
CArray2< int32_t > | m_positions |
CArray< bool > | m_genestr_stop |
CArray2< float64_t > | m_lin_feat |
float64_t * | m_raw_intensities |
int32_t * | m_probe_pos |
int32_t * | m_num_probes_cum |
int32_t * | m_num_lin_feat_plifs_cum |
int32_t | m_num_raw_data |
int32_t | m_genestr_len |
model specific variables. | |
int32_t | N |
number of states | |
CArray2< int32_t > | transition_matrix_a_id |
transition matrix | |
CArray2< float64_t > | transition_matrix_a |
CArray2< float64_t > | transition_matrix_a_deriv |
CArray< float64_t > | initial_state_distribution_p |
initial distribution of states | |
CArray< float64_t > | initial_state_distribution_p_deriv |
CArray< float64_t > | end_state_distribution_q |
distribution of end-states | |
CArray< float64_t > | end_state_distribution_q_deriv |
CDynProg::CDynProg | ( | int32_t | p_num_svms = 8 |
) |
CDynProg::~CDynProg | ( | ) | [virtual] |
Definition at line 147 of file DynProg.cpp.
void CDynProg::best_path_2struct | ( | const float64_t * | seq, | |
int32_t | seq_len, | |||
const int32_t * | pos, | |||
CPlifBase ** | Plif_matrix, | |||
const char * | genestr, | |||
int32_t | genestr_len, | |||
int16_t | nbest, | |||
float64_t * | prob_nbest, | |||
int32_t * | my_state_seq, | |||
int32_t * | my_pos_seq, | |||
float64_t * | dictionary_weights, | |||
int32_t | dict_len, | |||
float64_t * | segment_sum_weights | |||
) |
best path 2struct
seq | sequence | |
seq_len | length of sequence | |
pos | position | |
Plif_matrix | Plif matrix | |
genestr | gene string | |
genestr_len | length of gene string | |
nbest | nbest | |
prob_nbest | prob(ability?) nbest | |
my_state_seq | my state seq | |
my_pos_seq | my pos seq | |
dictionary_weights | dictionary weights | |
dict_len | length of dictionary weights | |
segment_sum_weights | segment sum weights |
Definition at line 1513 of file DynProg.cpp.
void CDynProg::best_path_2struct_call | ( | int32_t | nbest | ) |
void CDynProg::best_path_call | ( | int32_t | nbest, | |
bool | use_orf | |||
) |
best path call
nbest | nbest | |
use_orf | whether to use orf |
Definition at line 1004 of file DynProg.cpp.
void CDynProg::best_path_deriv_call | ( | int32_t | nbest | ) |
void CDynProg::best_path_deriv_call | ( | ) |
best path derivative call
Definition at line 1039 of file DynProg.cpp.
void CDynProg::best_path_get_losses | ( | float64_t ** | my_losses, | |
int32_t * | seq_len | |||
) |
get best path losses
my_losses | my losses | |
seq_len | length of sequence |
Definition at line 1163 of file DynProg.cpp.
void CDynProg::best_path_get_positions | ( | int32_t ** | positions, | |
int32_t * | m, | |||
int32_t * | n | |||
) |
best path get positions
positions | positions | |
m | dimension m | |
n | dimension n |
Definition at line 1150 of file DynProg.cpp.
void CDynProg::best_path_get_scores | ( | float64_t ** | scores, | |
int32_t * | n | |||
) |
best path get scores
scores | scores | |
n | dimension n |
Definition at line 1120 of file DynProg.cpp.
void CDynProg::best_path_get_states | ( | int32_t ** | states, | |
int32_t * | m, | |||
int32_t * | n | |||
) |
best path get states
states | states | |
m | dimension m | |
n | dimension n |
Definition at line 1138 of file DynProg.cpp.
float64_t CDynProg::best_path_no_b | ( | int32_t | max_iter, | |
int32_t & | best_iter, | |||
int32_t * | my_path | |||
) |
best path no b
max_iter | max iter | |
best_iter | best iter | |
my_path | my path |
Definition at line 1173 of file DynProg.cpp.
void CDynProg::best_path_no_b_trans | ( | int32_t | max_iter, | |
int32_t & | max_best_iter, | |||
int16_t | nbest, | |||
float64_t * | prob_nbest, | |||
int32_t * | my_paths | |||
) |
best path no b transition
max_iter | max iter | |
max_best_iter | max best iter | |
nbest | nbest | |
prob_nbest | prob_nbest | |
my_paths | my paths |
Definition at line 1258 of file DynProg.cpp.
void CDynProg::best_path_set_dict_weights | ( | float64_t * | dictionary_weights, | |
int32_t | dict_len, | |||
int32_t | n | |||
) |
set best path dict weights
dictionary_weights | dictionary weights | |
dict_len | length of dictionary weights | |
n | dimension n |
Definition at line 952 of file DynProg.cpp.
void CDynProg::best_path_set_genestr | ( | char * | genestr, | |
int32_t | genestr_len, | |||
int32_t | genestr_num | |||
) |
set best path genesstr
genestr | gene string | |
genestr_len | length of gene string | |
genestr_num | number of gene strings, typically 1 |
Definition at line 920 of file DynProg.cpp.
void CDynProg::best_path_set_my_pos_seq | ( | int32_t * | my_pos_seq, | |
int32_t | seq_len | |||
) |
set best path my position sequence
my_pos_seq | my position sequence | |
seq_len | length of sequence |
Definition at line 944 of file DynProg.cpp.
void CDynProg::best_path_set_my_state_seq | ( | int32_t * | my_state_seq, | |
int32_t | seq_len | |||
) |
set best path my state sequence
my_state_seq | my state sequence | |
seq_len | length of sequence |
Definition at line 935 of file DynProg.cpp.
void CDynProg::best_path_set_orf_info | ( | int32_t * | orf_info, | |
int32_t | m, | |||
int32_t | n | |||
) |
set best path orf info only for best_path_trans
orf_info | the orf info | |
m | dimension m | |
n | dimension n |
Definition at line 821 of file DynProg.cpp.
void CDynProg::best_path_set_plif_id_matrix | ( | int32_t * | plif_id_matrix, | |
int32_t | m, | |||
int32_t | n | |||
) |
set best path plif id(entity?) matrix
plif_id_matrix | plif id matrix | |
m | dimension m of matrix | |
n | dimension n of matrix |
Definition at line 867 of file DynProg.cpp.
void CDynProg::best_path_set_plif_list | ( | CDynamicArray< CPlifBase * > * | plifs | ) |
void CDynProg::best_path_set_plif_state_signal_matrix | ( | int32_t * | plif_id_matrix, | |
int32_t | m, | |||
int32_t | n | |||
) |
set best path plif state signal matrix
plif_id_matrix | plif id matrix | |
m | dimension m of matrix | |
n | dimension n of matrix |
Definition at line 892 of file DynProg.cpp.
void CDynProg::best_path_set_pos | ( | int32_t * | pos, | |
int32_t | seq_len | |||
) |
set best path pos
pos | the position | |
seq_len | length of sequence |
Definition at line 808 of file DynProg.cpp.
void CDynProg::best_path_set_segment_ids_mask | ( | int32_t * | segment_ids, | |
float64_t * | segment_mask, | |||
int32_t | m | |||
) |
set best path segmend ids mask
segment_ids | segment ids | |
segment_mask | segment mask | |
m | dimension m |
Definition at line 990 of file DynProg.cpp.
void CDynProg::best_path_set_segment_loss | ( | float64_t * | segment_loss, | |
int32_t | num_segment_id1, | |||
int32_t | num_segment_id2 | |||
) |
set best path segment loss
segment_loss | segment loss | |
num_segment_id1 | number of segment id1 | |
num_segment_id2 | number of segment id2 |
Definition at line 974 of file DynProg.cpp.
void CDynProg::best_path_set_segment_sum_weights | ( | float64_t * | segment_sum_weights, | |
int32_t | num_states, | |||
int32_t | seq_len | |||
) |
set best path segment sum weights only for best_path_2struct
segment_sum_weights | segment sum weights | |
num_states | number of states | |
seq_len | length of sequence |
Definition at line 836 of file DynProg.cpp.
void CDynProg::best_path_set_seq | ( | float64_t * | seq, | |
int32_t | N, | |||
int32_t | seq_len | |||
) |
set best path seq
seq | the sequence | |
N | dimension N | |
seq_len | length of sequence |
Definition at line 769 of file DynProg.cpp.
void CDynProg::best_path_set_seq3d | ( | float64_t * | seq, | |
int32_t | p_N, | |||
int32_t | seq_len, | |||
int32_t | max_num_signals | |||
) |
set best path seq3d
seq | the 3D sequence | |
p_N | dimension N | |
seq_len | length of sequence | |
max_num_signals | maximal number of signals |
Definition at line 788 of file DynProg.cpp.
void CDynProg::best_path_set_single_genestr | ( | char * | genestr, | |
int32_t | genestr_len | |||
) |
void CDynProg::best_path_simple_call | ( | int32_t | nbest | ) |
void CDynProg::best_path_trans | ( | const float64_t * | seq, | |
int32_t | seq_len, | |||
const int32_t * | pos, | |||
const int32_t * | orf_info, | |||
CPlifBase ** | PLif_matrix, | |||
CPlifBase ** | Plif_state_signals, | |||
int32_t | max_num_signals, | |||
int32_t | genestr_num, | |||
float64_t * | prob_nbest, | |||
int32_t * | my_state_seq, | |||
int32_t * | my_pos_seq, | |||
bool | use_orf | |||
) |
best path trans
seq | sequence | |
seq_len | length of sequence | |
pos | position | |
orf_info | orf info | |
PLif_matrix | Plif matrix | |
Plif_state_signals | Plif state signals | |
max_num_signals | maximal number of signals | |
genestr_num | number of gene strings | |
prob_nbest | prob nbest | |
my_state_seq | my state seq | |
my_pos_seq | my pos seq | |
use_orf | whether orf shall be used |
Definition at line 2380 of file DynProg.cpp.
void CDynProg::best_path_trans_deriv | ( | int32_t * | my_state_seq, | |
int32_t * | my_pos_seq, | |||
float64_t * | my_scores, | |||
float64_t * | my_losses, | |||
int32_t | my_seq_len, | |||
const float64_t * | seq_array, | |||
int32_t | seq_len, | |||
const int32_t * | pos, | |||
CPlifBase ** | Plif_matrix, | |||
CPlifBase ** | Plif_state_signals, | |||
int32_t | max_num_signals, | |||
int32_t | genestr_num | |||
) |
best path trans derivative
my_state_seq | my state seq | |
my_pos_seq | my pos seq | |
my_scores | my scores | |
my_losses | my losses | |
my_seq_len | my sequence length | |
seq_array | sequence array | |
seq_len | length of sequence | |
pos | position | |
Plif_matrix | Plif matrix | |
Plif_state_signals | Plif state signals | |
max_num_signals | maximal number of signals | |
genestr_num | number of gene strings |
Definition at line 3037 of file DynProg.cpp.
void CDynProg::best_path_trans_simple | ( | const float64_t * | seq, | |
int32_t | seq_len, | |||
int16_t | nbest, | |||
float64_t * | prob_nbest, | |||
int32_t * | my_state_seq | |||
) |
best path trans simple
seq | sequence | |
seq_len | length of sequence | |
nbest | nbest | |
prob_nbest | prob(ability?) nbest | |
my_state_seq | my state seq |
Definition at line 3301 of file DynProg.cpp.
bool CDynProg::check_svm_arrays | ( | ) |
check SVM arrays call this function to check consistency
Definition at line 713 of file DynProg.cpp.
void CDynProg::clear_segment_loss | ( | struct segment_loss_struct & | loss | ) | [protected] |
clear segment loss
loss | segment loss to clear |
Definition at line 1861 of file DynProg.cpp.
void CDynProg::clear_svm_values | ( | struct svm_values_struct & | svs | ) | [protected] |
void CDynProg::create_word_string | ( | const char * | genestr, | |
int32_t | genestr_num, | |||
int32_t | genestr_len, | |||
uint16_t *** | wordstr | |||
) |
create word string from char* Jonas
genestr | gene string | |
genestr_num | number of gene string | |
genestr_len | length of gene string | |
wordstr | word strings |
Definition at line 384 of file DynProg.cpp.
bool CDynProg::extend_orf | ( | int32_t | orf_from, | |
int32_t | orf_to, | |||
int32_t | start, | |||
int32_t & | last_pos, | |||
int32_t | to | |||
) | [protected] |
extend orf
orf_from | orf from | |
orf_to | orf to | |
start | start | |
last_pos | last position | |
to | to |
Definition at line 2341 of file DynProg.cpp.
float64_t CDynProg::extend_segment_loss | ( | struct segment_loss_struct & | loss, | |
const int32_t * | pos_array, | |||
int32_t | segment_id, | |||
int32_t | pos, | |||
int32_t & | last_pos, | |||
float64_t & | last_value | |||
) | [protected] |
extend segment loss
loss | segment loss to extend | |
pos_array | position array | |
segment_id | ID of segment | |
pos | position | |
last_pos | last position | |
last_value | last value |
Definition at line 1882 of file DynProg.cpp.
void CDynProg::extend_segment_sum_value | ( | float64_t * | segment_sum_weights, | |
int32_t | seqlen, | |||
int32_t | num_states, | |||
int32_t | pos, | |||
int32_t & | last_segment_sum_pos, | |||
float64_t * | segment_sum_value | |||
) | [protected] |
extend segment sum value
segment_sum_weights | segment sum weights | |
seqlen | length of sequence | |
num_states | number of states | |
pos | position | |
last_segment_sum_pos | last segment sum position | |
segment_sum_value | value to set |
Definition at line 1499 of file DynProg.cpp.
void CDynProg::extend_svm_value | ( | uint16_t * | wordstr, | |
int32_t | pos, | |||
int32_t & | last_svm_pos, | |||
float64_t * | svm_value | |||
) | [protected] |
extend SVM value
wordstr | word string | |
pos | position | |
last_svm_pos | lsat SVM position | |
svm_value | value to set |
Definition at line 1453 of file DynProg.cpp.
int32_t CDynProg::find_frame | ( | const int32_t | from_state | ) | [protected] |
find frame
from_state | from state |
void CDynProg::find_segment_loss_till_pos | ( | const int32_t * | pos, | |
int32_t | t_end, | |||
CArray< int32_t > & | segment_ids, | |||
CArray< float64_t > & | segment_mask, | |||
struct segment_loss_struct & | loss | |||
) | [protected] |
find segment loss till pos
pos | position | |
t_end | t end | |
segment_ids | segment IDs | |
segment_mask | segmend mask | |
loss | segment loss |
Definition at line 1949 of file DynProg.cpp.
void CDynProg::find_svm_values_till_pos | ( | uint16_t ** | wordstr, | |
const int32_t * | pos, | |||
int32_t | t_end, | |||
struct svm_values_struct & | svs | |||
) | [protected] |
find SVM values till position
wordstr | word string | |
pos | position | |
t_end | t end | |
svs | SVM values |
Definition at line 2236 of file DynProg.cpp.
void CDynProg::find_svm_values_till_pos | ( | uint16_t *** | wordstr, | |
const int32_t * | pos, | |||
int32_t | t_end, | |||
struct svm_values_struct & | svs | |||
) | [protected] |
find SVM values till position (swig compatible?)
wordstr | word string | |
pos | position | |
t_end | t end | |
svs | SVM values |
Definition at line 2121 of file DynProg.cpp.
float64_t* CDynProg::get_lin_feat | ( | int32_t & | dim1, | |
int32_t & | dim2 | |||
) |
T_STATES CDynProg::get_N | ( | ) | const |
virtual const char* CDynProg::get_name | ( | ) | const [protected, virtual] |
int32_t CDynProg::get_num_states | ( | ) |
get num states
Definition at line 235 of file DynProg.cpp.
int32_t CDynProg::get_num_svms | ( | ) |
get num svms
Definition at line 194 of file DynProg.cpp.
void CDynProg::init_content_svm_value_array | ( | const int32_t | p_num_svms, | |
const int32_t | seq_len | |||
) |
init CArray for precomputed content svm values with size seq_len x num_svms
p_num_svms,: | number of svm weight vectors for content prediction | |
seq_len,: | number of candidate positions |
Definition at line 271 of file DynProg.cpp.
void CDynProg::init_cum_num_words_array | ( | int32_t * | p_cum_num_words_array, | |
int32_t | num_elem | |||
) |
init cum num words array
p_cum_num_words_array | new cum num words array | |
num_elem | number of array elements |
Definition at line 640 of file DynProg.cpp.
void CDynProg::init_mod_words_array | ( | int32_t * | p_mod_words_array, | |
int32_t | num_elem, | |||
int32_t | num_columns | |||
) |
init mod words array
p_mod_words_array | new mod words array | |
num_elem | number of array elements | |
num_columns | number of columns |
Definition at line 669 of file DynProg.cpp.
void CDynProg::init_num_words_array | ( | int32_t * | p_num_words_array, | |
int32_t | num_elem | |||
) |
init num words array
p_num_words_array | new num words array | |
num_elem | number of array elements |
Definition at line 653 of file DynProg.cpp.
void CDynProg::init_segment_loss | ( | struct segment_loss_struct & | loss, | |
int32_t | seqlen, | |||
int32_t | howmuchlookback | |||
) | [protected] |
init segment loss
loss | segment loss to init | |
seqlen | length of sequence | |
howmuchlookback | how far to look back |
Definition at line 1825 of file DynProg.cpp.
void CDynProg::init_sign_words_array | ( | bool * | p_sign_words_array, | |
int32_t | num_elem | |||
) |
init sign words array
p_sign_words_array | new sign words array | |
num_elem | number of array elements |
Definition at line 692 of file DynProg.cpp.
void CDynProg::init_string_words_array | ( | int32_t * | p_string_words_array, | |
int32_t | num_elem | |||
) |
init string words array
p_string_words_array | new string words array | |
num_elem | number of array elements |
Definition at line 702 of file DynProg.cpp.
void CDynProg::init_svm_arrays | ( | int32_t | p_num_degrees, | |
int32_t | p_num_svms | |||
) |
init SVM arrays
p_num_degrees | number of degrees | |
p_num_svms | number of SVMs |
Definition at line 608 of file DynProg.cpp.
void CDynProg::init_svm_values | ( | struct svm_values_struct & | svs, | |
int32_t | start_pos, | |||
int32_t | seqlen, | |||
int32_t | howmuchlookback | |||
) | [protected] |
init SVM values
svs | SVM values | |
start_pos | start position | |
seqlen | length of sequence | |
howmuchlookback | how far to look back |
Definition at line 2012 of file DynProg.cpp.
void CDynProg::init_tiling_data | ( | int32_t * | probe_pos, | |
float64_t * | intensities, | |||
const int32_t | num_probes, | |||
const int32_t | seq_len | |||
) |
init CArray for precomputed tiling intensitie-plif-values with size seq_len x num_svms
probe_pos | local positions of probes | |
intensities | intensities of probes | |
num_probes | number of probes | |
seq_len,: | number of candidate positions |
Definition at line 240 of file DynProg.cpp.
void CDynProg::init_word_degree_array | ( | int32_t * | p_word_degree_array, | |
int32_t | num_elem | |||
) |
init word degree array
p_word_degree_array | new word degree array | |
num_elem | number of array elements |
Definition at line 626 of file DynProg.cpp.
void CDynProg::lookup_content_svm_values | ( | const int32_t | from_state, | |
const int32_t | to_state, | |||
const int32_t | from_pos, | |||
const int32_t | to_pos, | |||
float64_t * | svm_values, | |||
int32_t | frame | |||
) | [protected] |
void CDynProg::lookup_tiling_plif_values | ( | const int32_t | from_state, | |
const int32_t | to_state, | |||
const int32_t | len, | |||
float64_t * | svm_values | |||
) | [protected] |
lookup tiling Plif values
from_state | from state | |
to_state | to state | |
len | length | |
svm_values | SVM values |
void CDynProg::precompute_content_values | ( | uint16_t *** | wordstr, | |
const int32_t * | pos, | |||
const int32_t | num_cand_pos, | |||
const int32_t | genestr_len, | |||
float64_t * | dictionary_weights, | |||
int32_t | dict_len | |||
) |
create array of precomputed content svm values Jonas
wordstr | word strings | |
pos | position | |
num_cand_pos | number of cand position | |
genestr_len | length of DNA-sequence | |
dictionary_weights | SVM weight vectors for content prediction | |
dict_len | number of weight vectors |
Definition at line 416 of file DynProg.cpp.
void CDynProg::precompute_stop_codons | ( | const char * | genestr, | |
int32_t | genestr_len | |||
) |
precompute stop codons
genestr | gene string | |
genestr_len | length of gene string |
Definition at line 199 of file DynProg.cpp.
void CDynProg::precompute_tiling_plifs | ( | CPlif ** | PEN, | |
const int32_t * | tiling_plif_ids, | |||
const int32_t | num_tiling_plifs, | |||
const int32_t | seq_len, | |||
const int32_t * | pos | |||
) |
precompute tiling Plifs
PEN | Plif PEN | |
tiling_plif_ids | tiling plif id's | |
num_tiling_plifs | number of tiling plifs | |
seq_len | sequence length | |
pos | pos |
Definition at line 307 of file DynProg.cpp.
int32_t CDynProg::raw_intensities_interval_query | ( | const int32_t | from_pos, | |
const int32_t | to_pos, | |||
float64_t * | intensities, | |||
int32_t | type | |||
) | [protected] |
void CDynProg::reset_segment_sum_value | ( | int32_t | num_states, | |
int32_t | pos, | |||
int32_t & | last_segment_sum_pos, | |||
float64_t * | segment_sum_value | |||
) | [protected] |
reset segment sum value
num_states | number of states | |
pos | position | |
last_segment_sum_pos | last segment sum position | |
segment_sum_value | value to set |
Definition at line 1489 of file DynProg.cpp.
void CDynProg::reset_svm_value | ( | int32_t | pos, | |
int32_t & | last_svm_pos, | |||
float64_t * | svm_value | |||
) | [protected] |
reset SVM value
pos | position | |
last_svm_pos | last SVM position | |
svm_value | value to set |
Definition at line 1440 of file DynProg.cpp.
void CDynProg::resize_lin_feat | ( | int32_t | num_new_feat, | |
int32_t | seq_len | |||
) |
append rows to linear features array
num_new_feat | number of new rows to add | |
seq_len | number of columns == number of candidate positions (must be equal to the existing num of cols) |
Definition at line 275 of file DynProg.cpp.
void CDynProg::set_a | ( | float64_t * | a, | |
int32_t | M, | |||
int32_t | N | |||
) |
set matrix a
a | new matrix a | |
M | dimension M of matrix a | |
N | dimension N of matrix a |
Definition at line 493 of file DynProg.cpp.
void CDynProg::set_a_id | ( | int32_t * | a, | |
int32_t | M, | |||
int32_t | N | |||
) |
set a id
a | new a id (identity?) | |
M | dimension M of matrix a | |
N | dimension N of matrix a |
Definition at line 501 of file DynProg.cpp.
void CDynProg::set_a_trans_matrix | ( | float64_t * | a_trans, | |
int32_t | num_trans, | |||
int32_t | N | |||
) |
set a transition matrix
a_trans | transition matrix a | |
num_trans | number of transitions | |
N | dimension N of matrix a |
Definition at line 512 of file DynProg.cpp.
void CDynProg::set_genestr_len | ( | int32_t | genestr_len | ) |
set genestr len
genestr_len | length of gene string |
Definition at line 189 of file DynProg.cpp.
void CDynProg::set_lin_feat | ( | float64_t * | p_lin_feat, | |
int32_t | p_num_svms, | |||
int32_t | p_seq_len | |||
) |
void CDynProg::set_num_states | ( | int32_t | p_N | ) |
set number of states use this to set N first
p_N | new N |
Definition at line 218 of file DynProg.cpp.
void CDynProg::set_p_vector | ( | float64_t * | p, | |
int32_t | N | |||
) |
set vector p
p | new vector p | |
N | size of vector p |
Definition at line 476 of file DynProg.cpp.
void CDynProg::set_q_vector | ( | float64_t * | q, | |
int32_t | N | |||
) |
set vector q
q | new vector q | |
N | size of vector q |
Definition at line 486 of file DynProg.cpp.
void CDynProg::translate_from_single_order | ( | uint16_t * | obs, | |
int32_t | sequence_length, | |||
int32_t | start, | |||
int32_t | order, | |||
int32_t | max_val = 2 | |||
) | [protected] |
translate from single order
obs | observation matrix | |
sequence_length | length of sequence | |
start | start | |
order | order | |
max_val | maximum number of bits, e.g. 2 for DNA |
Definition at line 1407 of file DynProg.cpp.
void CDynProg::update_svm_values_till_pos | ( | uint16_t *** | wordstr, | |
const int32_t * | pos, | |||
int32_t | t_end, | |||
int32_t | prev_t_end, | |||
struct svm_values_struct & | svs | |||
) | [protected] |
update SVM values till position
wordstr | word string | |
pos | position | |
t_end | t end | |
prev_t_end | previous t end | |
svs | SVM values |
CArray<int32_t> CDynProg::cum_num_words [protected] |
int32_t* CDynProg::cum_num_words_array [protected] |
int32_t CDynProg::cum_num_words_single [protected] |
CArray2<float64_t> CDynProg::dict_weights [protected] |
float64_t* CDynProg::dict_weights_array [protected] |
CArray<float64_t> CDynProg::end_state_distribution_q [protected] |
CArray<float64_t> CDynProg::end_state_distribution_q_deriv [protected] |
CArray<float64_t> CDynProg::initial_state_distribution_p [protected] |
CArray<float64_t> CDynProg::initial_state_distribution_p_deriv [protected] |
int32_t CDynProg::m_call [protected] |
CArray2<float64_t> CDynProg::m_dict_weights [protected] |
CArray2<char> CDynProg::m_genestr [protected] |
int32_t CDynProg::m_genestr_len [protected] |
CArray<bool> CDynProg::m_genestr_stop [protected] |
CArray2<float64_t> CDynProg::m_lin_feat [protected] |
CArray<float64_t> CDynProg::m_my_losses [protected] |
CArray<int32_t> CDynProg::m_my_pos_seq [protected] |
CArray<float64_t> CDynProg::m_my_scores [protected] |
CArray<int32_t> CDynProg::m_my_state_seq [protected] |
int32_t* CDynProg::m_num_lin_feat_plifs_cum [protected] |
int32_t* CDynProg::m_num_probes_cum [protected] |
int32_t CDynProg::m_num_raw_data [protected] |
CArray2<int32_t> CDynProg::m_orf_info [protected] |
CArray2<CPlifBase*> CDynProg::m_PEN [protected] |
CArray2<CPlifBase*> CDynProg::m_PEN_state_signals [protected] |
CArray<CPlifBase*> CDynProg::m_plif_list [protected] |
CArray<int32_t> CDynProg::m_pos [protected] |
CArray2<int32_t> CDynProg::m_positions [protected] |
int32_t* CDynProg::m_probe_pos [protected] |
float64_t* CDynProg::m_raw_intensities [protected] |
CArray<float64_t> CDynProg::m_scores [protected] |
CArray<int32_t> CDynProg::m_segment_ids [protected] |
CArray3<float64_t> CDynProg::m_segment_loss [protected] |
CArray<float64_t> CDynProg::m_segment_mask [protected] |
CArray2<float64_t> CDynProg::m_segment_sum_weights [protected] |
CArray3<float64_t> CDynProg::m_seq [protected] |
CArray2<int32_t> CDynProg::m_states [protected] |
int32_t CDynProg::m_step [protected] |
int32_t CDynProg::max_a_id [protected] |
CArray2<int32_t> CDynProg::mod_words [protected] |
int32_t* CDynProg::mod_words_array [protected] |
int32_t CDynProg::N [protected] |
int32_t CDynProg::num_degrees [protected] |
int32_t CDynProg::num_strings [protected] |
int32_t CDynProg::num_svms [protected] |
int32_t CDynProg::num_svms_single [protected] |
CArray<int32_t> CDynProg::num_unique_words [protected] |
int32_t CDynProg::num_unique_words_single [protected] |
CArray<int32_t> CDynProg::num_words [protected] |
int32_t* CDynProg::num_words_array [protected] |
int32_t CDynProg::num_words_single [protected] |
CArray<bool> CDynProg::sign_words [protected] |
bool* CDynProg::sign_words_array [protected] |
CArray<int32_t> CDynProg::string_words [protected] |
int32_t* CDynProg::string_words_array [protected] |
bool CDynProg::svm_arrays_clean [protected] |
CArray<int32_t> CDynProg::svm_pos_start [protected] |
CArray<float64_t> CDynProg::svm_value_unnormalized_single [protected] |
CArray2<float64_t> CDynProg::transition_matrix_a [protected] |
CArray2<float64_t> CDynProg::transition_matrix_a_deriv [protected] |
CArray2<int32_t> CDynProg::transition_matrix_a_id [protected] |
CArray<int32_t> CDynProg::word_degree [protected] |
int32_t CDynProg::word_degree_single [protected] |
CArray<bool> CDynProg::word_used_single [protected] |