diff options
author | Patrick Simianer <p@simianer.de> | 2014-07-15 18:20:49 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-07-15 18:20:49 +0200 |
commit | a7ca2c4f4cd4f6f88c805bf89d9ee6ac55941a89 (patch) | |
tree | 2266ebd5b16f1fc257090e6b8e9136e82bea06c4 /fast/hypergraph.hh | |
parent | e207b43bf179277d53b3adc767372469bd8a2ad2 (diff) |
before msgpack
Diffstat (limited to 'fast/hypergraph.hh')
-rw-r--r-- | fast/hypergraph.hh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fast/hypergraph.hh b/fast/hypergraph.hh index 24e63f5..e5f91cb 100644 --- a/fast/hypergraph.hh +++ b/fast/hypergraph.hh @@ -17,16 +17,18 @@ using namespace std; typedef double score_t; typedef double weight_t; +typedef size_t id_t; namespace Hg { + class Node; -class Hyperedge { +class Edge { public: - Node* head; - vector<Node*> tails; + id_t head; + vector<id_t> tails; score_t score; vector<weight_t> f; unsigned int mark; @@ -48,8 +50,8 @@ class Node { unsigned int left; unsigned int right; score_t score; - vector<Hyperedge*> outgoing; - vector<Hyperedge*> incoming; + vector<id_t> outgoing; + vector<id_t> incoming; string s(); @@ -60,10 +62,9 @@ class Node { class Hypergraph { public: - vector<Node*> nodes; - vector<Hyperedge*> edges; - unsigned int arity_; - map<unsigned int, Node*> nodes_by_id; + vector<Node> nodes; + vector<Edge> edges; + unsigned int arity_; unsigned int arity(); void reset(); |