7 #ifndef GDST_UKKONEN_INSERTER_HPP_ 8 #define GDST_UKKONEN_INSERTER_HPP_ 9 #include "boost/assert.hpp" 94 st_.
bm_[branch].sb_ = leaf;
97 if(
st_[branch].n_ == 1) {
102 if(
st_[leaf].n_ == 1) {
128 BOOST_ASSERT(active_length_ < suff_.size());
137 BOOST_ASSERT(active_length_ < suff_.size());
139 st_.
child(active_node_, n, bid);
144 BOOST_ASSERT(prev_branch_);
145 BOOST_ASSERT( ! st_[prev_branch_].sl_);
146 BOOST_ASSERT( st_[prev_branch_].n_ == st_[bid].n_ + 1);
152 BOOST_ASSERT( ! st_[prev_leaf_].sl_);
153 BOOST_ASSERT( st_[prev_leaf_].n_ == st_[bid].n_ + 1);
171 st_.
bm_[bid2].sb_ = bid2;
172 st_.
child(bid, n1, bid2);
185 BOOST_ASSERT(active_length_ < i &&
"new child index should be greater");
188 BOOST_ASSERT(i < st_[bid3].n_ &&
"old child index should be greater");
190 st_.
child(bid2, n2, bid3);
197 BOOST_ASSERT(st_[active_node_].n_ < st_[c].n_);
202 BOOST_ASSERT(active_node_);
203 BOOST_ASSERT(active_length_ < i);
206 BOOST_ASSERT(i < st_[c].n_);
Branch_id prev_leaf_
Definition: gdst_ukkonen_inserter.hpp:125
unsigned edge_length() const
Definition: gdst_ukkonen_inserter.hpp:194
static void insert(Gdst &st, const Seq_id sid)
Definition: gdst_ukkonen_inserter.hpp:22
void add_to_leaf(const Branch_id bid)
Definition: gdst_ukkonen_inserter.hpp:157
Branch_id active_child() const
Definition: gdst_ukkonen_inserter.hpp:132
Nucleotide
Definition: nucleotide_index.hpp:24
Branch_id prev_branch_
Definition: gdst_ukkonen_inserter.hpp:125
boost::string_ref suff_
Definition: gdst_ukkonen_inserter.hpp:121
Branch_id child(const Branch_id bid1, const Nucleotide n) const
Definition: gdst.hpp:176
Nucleotide active_edge() const
Definition: gdst_ukkonen_inserter.hpp:127
leaf_map lm_
Definition: gdst.hpp:250
unsigned active_length_
Definition: gdst_ukkonen_inserter.hpp:123
Leaf_id leaf_
Definition: nodes.hpp:67
void set_active_node(const Branch_id bid)
Definition: gdst_ukkonen_inserter.hpp:176
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
unsigned md_
Definition: gdst_ukkonen_inserter.hpp:124
According to: http://www.cise.ufl.edu/~sahni/dsaaj/enrich/c16/suffix.htm http://stackoverflow.com/questions/9452701.
Definition: gdst_ukkonen_inserter.hpp:20
void insert()
Definition: gdst_ukkonen_inserter.hpp:40
void set_branch_sl(const Branch_id bid)
Definition: gdst_ukkonen_inserter.hpp:142
Branch_id split_active_edge(const unsigned i, const Nucleotide n2)
Definition: gdst_ukkonen_inserter.hpp:181
Nucleotide letter(const unsigned i) const
Definition: gdst_ukkonen_inserter.hpp:201
branch_map bm_
Definition: gdst.hpp:248
bool has_next() const
Definition: gdst_ukkonen_inserter.hpp:38
void active_child(const Branch_id bid)
Definition: gdst_ukkonen_inserter.hpp:136
Branch_id root() const
Definition: gdst.hpp:101
Branch_id active_node_
Definition: gdst_ukkonen_inserter.hpp:122
const std::size_t n
Definition: vector_set_test.cpp:26
Ukkonen_inserter(Gdst &st, const Seq_id sid)
Definition: gdst_ukkonen_inserter.hpp:26
const Seq_id sid_
Definition: gdst_ukkonen_inserter.hpp:120
Nucleotide nucleotide_index(const char c)
Definition: nucleotide_index.hpp:45
void next()
Definition: gdst_ukkonen_inserter.hpp:37
Gdst & st_
Definition: gdst_ukkonen_inserter.hpp:119
Generalized DNA suffix tree.
Definition: gdst.hpp:66
void set_leaf_sl(const Branch_id bid)
Definition: gdst_ukkonen_inserter.hpp:150
Branch_id leaf_from_branch(const Branch_id bid, const Nucleotide n1)
Definition: gdst_ukkonen_inserter.hpp:165
id_type insert(value_type const &obj)
Definition: id_map.hpp:83
Store suffixes Each leaf is attached to a branch and stores suffixes that have the length of the bran...
Definition: nodes.hpp:22
Nucleotide letter(const Branch_id bid, const unsigned i) const
Definition: gdst.hpp:153