deps/kb_meme/meme-5.0.1/src/substmatrix-table.c
/*************************************************************************
  This function builds a table of transistion probability matrices: 
  The table is indexed by the edge number of the tree and the evo model.
 *************************************************************************/
This function builds a table of transistion probability matrices:
The table is indexed by the edge number of the tree and the evo model.
This function builds a table of transistion probability matrices : The table is indexed by the edge number of the tree and the evo model .
SUBSTMATRIX_TABLE_T* make_substmatrix_table(
  ALPH_T* alph,
  TREE_T* tree, 
  int num_models, 
  EVOMODEL_T** models
) {
  SUBSTMATRIX_TABLE_T* table = allocate_substmatrix_table(num_models);
  SUBSTMATRIX_ARRAY_T* array = NULL;
  int num_edges = get_num_edges(tree);
  int i;
  for (i = 0; i < num_models; i++) {
    array = allocate_substmatrix_array(num_edges);
    populate_substmatrix_array(alph, models[i], tree, 0, array);
    table->substmatrix_array[i] = array;
  }
  return table;
}
SUBSTMATRIX_TABLE_T * make_substmatrix_table ( ALPH_T * alph , TREE_T * tree , int num_models , EVOMODEL_T * * models ) { SUBSTMATRIX_TABLE_T * table = allocate_substmatrix_table ( num_models ) ; SUBSTMATRIX_ARRAY_T * array = NULL ; int num_edges = get_num_edges ( tree ) ; int i ; for ( i = 0 ; i < num_models ; i ++ ) { array = allocate_substmatrix_array ( num_edges ) ; populate_substmatrix_array ( alph , models [ i ] , tree , 0 , array ) ; table -> substmatrix_array [ i ] = array ; } return table ; }
This function builds a table of transistion probability matrices:
The table is indexed by the edge number of the tree and the evo model.
This function builds a table of transistion probability matrices : The table is indexed by the edge number of the tree and the evo model .