File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ class SuffixTree
3131template <class Iterator >
3232Iterator inc_search (Iterator sub)
3333{
34- typedef typename Iterator::value_type T;// extract real type
35-
3634Iterator result = sub;
3735Node* node = &root;
3836Edge* edge = NULL ;
@@ -73,13 +71,7 @@ class SuffixTree
7371return result;
7472}
7573
76- int print_tree (void );
77- private:
78- string test_str;
79-
8074struct Node ;
81- typedef struct Node Node;
82-
8375struct Edge {
8476// the begin and end pos of this edge, note that INT_MAX stands for #(the changing end pos of this entire string)
8577unsigned int begin, end;
@@ -146,7 +138,6 @@ class SuffixTree
146138
147139bool is_none (void ) { return begin == 0 && end == 0 ; }
148140};
149- typedef struct Edge Edge;
150141
151142struct Node {
152143string& test_node_str;
@@ -224,10 +215,9 @@ class SuffixTree
224215return os;
225216}
226217};
227- // typedef struct Node Node;
228-
229- friend struct Node ;
230-
218+ int print_tree (void );
219+ private:
220+ string test_str;
231221class ActivePoint {
232222public:
233223Node* active_node;
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ int SuffixTree::construct(void)
104104return 0 ;
105105}
106106
107- SuffixTree::Node* SuffixTree::seperate_edge (Node * node, Edge* a_edge)
107+ SuffixTree::Node* SuffixTree::separate_edge (Node * node, Edge* a_edge)
108108{
109109cout << " separate the old edge here: " << (*a_edge) << endl;
110110int new_begin = a_edge->begin + get_active_length ();
You can’t perform that action at this time.
0 commit comments