diff --git a/DataStructures/QueryEdge.h b/DataStructures/QueryEdge.h index b84c180d5..280972721 100644 --- a/DataStructures/QueryEdge.h +++ b/DataStructures/QueryEdge.h @@ -36,6 +36,16 @@ struct QueryEdge NodeID target; struct EdgeData { + EdgeData() {} + + template EdgeData(const OtherT &other) + { + distance = other.distance; + shortcut = other.shortcut; + id = other.id; + forward = other.forward; + backward = other.backward; + } NodeID id : 31; bool shortcut : 1; int distance : 30; @@ -43,6 +53,13 @@ struct QueryEdge bool backward : 1; } data; + QueryEdge() : source(SPECIAL_NODEID), target(SPECIAL_NODEID) {} + + QueryEdge(NodeID source, NodeID target, EdgeData data) + : source(source), target(target), data(data) + { + } + bool operator<(const QueryEdge &right) const { if (source != right.source)