Initial version of core ch

This improves preprocessing times in favour of worse query performance.
Core size can be set over the --core parameater, default is the old
behaviour to fully contract the graph.
This commit is contained in:
MoKob
2015-07-13 21:09:19 +02:00
committed by Patrick Niklaus
parent 94f44e1d5d
commit b526cadebd
10 changed files with 211 additions and 12 deletions
+5
View File
@@ -189,6 +189,11 @@ class BinaryHeap
return inserted_nodes[heap[1].index].node;
}
Weight MinKey() const {
BOOST_ASSERT(heap.size() > 1);
return heap[1].weight;
}
NodeID DeleteMin()
{
BOOST_ASSERT(heap.size() > 1);
+3
View File
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../routing_algorithms/many_to_many.hpp"
#include "../routing_algorithms/map_matching.hpp"
#include "../routing_algorithms/shortest_path.hpp"
#include "../routing_algorithms/direct_shortest_path.hpp"
#include <type_traits>
@@ -44,6 +45,7 @@ template <class DataFacadeT> class SearchEngine
public:
ShortestPathRouting<DataFacadeT> shortest_path;
DirectShortestPathRouting<DataFacadeT> direct_shortest_path;
AlternativeRouting<DataFacadeT> alternative_path;
ManyToManyRouting<DataFacadeT> distance_table;
MapMatching<DataFacadeT> map_matching;
@@ -51,6 +53,7 @@ template <class DataFacadeT> class SearchEngine
explicit SearchEngine(DataFacadeT *facade)
: facade(facade),
shortest_path(facade, engine_working_data),
direct_shortest_path(facade, engine_working_data),
alternative_path(facade, engine_working_data),
distance_table(facade, engine_working_data),
map_matching(facade, engine_working_data)