summaryrefslogtreecommitdiff
path: root/fast/hypergraph.hh
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-07-15 18:19:00 +0200
committerPatrick Simianer <p@simianer.de>2014-07-15 18:19:00 +0200
commite207b43bf179277d53b3adc767372469bd8a2ad2 (patch)
tree6cfab61e60bba7515b2872448b4fc5f2b860d822 /fast/hypergraph.hh
parent567f2bd17c05d31cd8a9b9d351f9030cddf53cb7 (diff)
before msgpack
Diffstat (limited to 'fast/hypergraph.hh')
-rw-r--r--fast/hypergraph.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/fast/hypergraph.hh b/fast/hypergraph.hh
index 6e53045..24e63f5 100644
--- a/fast/hypergraph.hh
+++ b/fast/hypergraph.hh
@@ -11,6 +11,8 @@
#include <functional>
#include <algorithm>
+#include <msgpack.hpp>
+
using namespace std;
typedef double score_t;
@@ -35,6 +37,7 @@ class Hyperedge {
bool is_marked();
string s();
+ MSGPACK_DEFINE(head, tails, score, f, mark, arity_);
};
@@ -49,6 +52,8 @@ class Node {
vector<Hyperedge*> incoming;
string s();
+
+ MSGPACK_DEFINE(id, symbol, left, right, score, outgoing, incoming);
};
@@ -64,6 +69,8 @@ class Hypergraph {
void reset();
string s();
string json_s();
+
+ MSGPACK_DEFINE(nodes, edges, arity_, nodes_by_id);
};
vector<Node*> topological_sort(vector<Node*>& nodes);