Add duration to edges and use it in table plugin

This commit is contained in:
Michael Krasnyk
2017-01-19 22:52:09 +01:00
committed by Patrick Niklaus
parent c059d15cb9
commit 25baf51a2c
24 changed files with 312 additions and 126 deletions
+3 -2
View File
@@ -324,6 +324,7 @@ void Extractor::FindComponents(unsigned max_edge_id,
{
struct UncontractedEdgeData
{
EdgeWeight duration;
};
struct InputEdge
{
@@ -353,12 +354,12 @@ void Extractor::FindComponents(unsigned max_edge_id,
BOOST_ASSERT(edge.target <= max_edge_id);
if (edge.forward)
{
edges.push_back({edge.source, edge.target, {}});
edges.push_back({edge.source, edge.target, {edge.duration}});
}
if (edge.backward)
{
edges.push_back({edge.target, edge.source, {}});
edges.push_back({edge.target, edge.source, {edge.duration}});
}
}