Skip to content

issue #46 : Build Error #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions include/suffix_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class SuffixTree
template <class Iterator>
Iterator inc_search(Iterator sub)
{
typedef typename Iterator::value_type T; // extract real type

Iterator result = sub;
Node* node = &root;
Edge* edge = NULL;
Expand Down Expand Up @@ -73,13 +71,7 @@ class SuffixTree
return result;
}

int print_tree(void);
private:
string test_str;

struct Node;
typedef struct Node Node;

struct Edge{
// the begin and end pos of this edge, note that INT_MAX stands for #(the changing end pos of this entire string)
unsigned int begin, end;
Expand Down Expand Up @@ -146,7 +138,6 @@ class SuffixTree

bool is_none(void) { return begin == 0 && end == 0; }
};
typedef struct Edge Edge;

struct Node{
string& test_node_str;
Expand Down Expand Up @@ -224,10 +215,9 @@ class SuffixTree
return os;
}
};
//typedef struct Node Node;

friend struct Node;

int print_tree(void);
private:
string test_str;
class ActivePoint{
public:
Node* active_node;
Expand Down
2 changes: 1 addition & 1 deletion src/suffix_tree_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int SuffixTree::construct(void)
return 0;
}

SuffixTree::Node* SuffixTree::seperate_edge(Node * node, Edge* a_edge)
SuffixTree::Node* SuffixTree::separate_edge(Node * node, Edge* a_edge)
{
cout << "separate the old edge here: " << (*a_edge) << endl;
int new_begin = a_edge->begin + get_active_length();
Expand Down