[Lemon-commits] Daniel Poroszkai: Update LGF reader to work with...
Lemon HG
hg at lemon.cs.elte.hu
Fri Mar 1 17:49:48 CET 2013
details: http://lemon.cs.elte.hu/hg/lemon/rev/374a9519986b
changeset: 1197:374a9519986b
user: Daniel Poroszkai <poroszd [at] inf.elte.hu>
date: Sun Feb 05 00:04:44 2012 +0100
description:
Update LGF reader to work with typesafe bipartite node sets (#69)
diffstat:
lemon/lgf_reader.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h
--- a/lemon/lgf_reader.h
+++ b/lemon/lgf_reader.h
@@ -2953,7 +2953,10 @@
throw FormatError(msg.str());
}
- e = _graph.addEdge(source, target);
+ // It is checked that source is red and
+ // target is blue, so this should be safe:
+ e = _graph.addEdge(_graph.asRedNodeUnsafe(source),
+ _graph.asBlueNodeUnsafe(target));
if (label_index != -1)
_edge_index.insert(std::make_pair(tokens[label_index], e));
} else {
More information about the Lemon-commits
mailing list