move to a dedicated dijkstra, separate code and header reduce heap size, we don't use more than 2000 nodes, so why allocate 170k?
28 lines
645 B
C++
28 lines
645 B
C++
#ifndef OSRM_CONTRACTOR_CONTRACTOR_HEAP_HPP_
|
|
#define OSRM_CONTRACTOR_CONTRACTOR_HEAP_HPP_
|
|
|
|
#include "util/binary_heap.hpp"
|
|
#include "util/typedefs.hpp"
|
|
#include "util/xor_fast_hash_storage.hpp"
|
|
|
|
namespace osrm
|
|
{
|
|
namespace contractor
|
|
{
|
|
struct ContractorHeapData
|
|
{
|
|
ContractorHeapData() {}
|
|
ContractorHeapData(short hop_, bool target_) : hop(hop_), target(target_) {}
|
|
|
|
short hop = 0;
|
|
bool target = false;
|
|
};
|
|
|
|
using ContractorHeap = util::
|
|
BinaryHeap<NodeID, NodeID, int, ContractorHeapData, util::XORFastHashStorage<NodeID, NodeID>>;
|
|
|
|
} // namespace contractor
|
|
} // namespace osrm
|
|
|
|
#endif // OSRM_CONTRACTOR_CONTRACTOR_HEAP_HPP_
|