Add graph compressor unit tests
This commit is contained in:
@@ -90,9 +90,11 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
*/
|
||||
template <class ContainerT> DynamicGraph(const NodeIterator nodes, const ContainerT &graph)
|
||||
{
|
||||
// we need to cast here because DeallocatingVector does not have a valid const iterator
|
||||
BOOST_ASSERT(std::is_sorted(const_cast<ContainerT&>(graph).begin(), const_cast<ContainerT&>(graph).end()));
|
||||
|
||||
number_of_nodes = nodes;
|
||||
number_of_edges = static_cast<EdgeIterator>(graph.size());
|
||||
// node_array.reserve(number_of_nodes + 1);
|
||||
node_array.resize(number_of_nodes + 1);
|
||||
EdgeIterator edge = 0;
|
||||
EdgeIterator position = 0;
|
||||
|
||||
@@ -46,6 +46,16 @@ struct NodeBasedEdgeData
|
||||
{
|
||||
}
|
||||
|
||||
NodeBasedEdgeData(int distance, unsigned edgeBasedNodeID, unsigned nameID,
|
||||
bool isAccessRestricted, bool shortcut, bool forward, bool backward,
|
||||
bool roundabout, bool ignore_in_grid, TravelMode travel_mode)
|
||||
: distance(distance), edgeBasedNodeID(edgeBasedNodeID),
|
||||
nameID(nameID), isAccessRestricted(isAccessRestricted), shortcut(shortcut),
|
||||
forward(forward), backward(backward), roundabout(roundabout), ignore_in_grid(ignore_in_grid),
|
||||
travel_mode(travel_mode)
|
||||
{
|
||||
}
|
||||
|
||||
int distance;
|
||||
unsigned edgeBasedNodeID;
|
||||
unsigned nameID;
|
||||
|
||||
Reference in New Issue
Block a user