Implements parallel recursion for the partitioner Fixes osrm-extract's -dump-partition-graph: accept no further tokens References: - http://www.boost.org/doc/libs/1_55_0/doc/html/boost/program_options/bool_switch.html Pulls parameters through to make them configurable from the outside Defaults are equivalent to: ./osrm-partition \ berlin-latest.osrm \ --max-cell-size 4096 \ --balance 1.2 \ --boundary 0.25 \ --optimizing-cuts 10 Fixes parallel_do call for Intel TBB 4.2 (Trusty): no range-based overload
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
#ifndef OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|
|
#define OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|
|
|
|
#include "partition/bisection_graph.hpp"
|
|
#include "partition/graph_view.hpp"
|
|
#include "partition/recursive_bisection_state.hpp"
|
|
|
|
#include <cstddef>
|
|
#include <vector>
|
|
|
|
namespace osrm
|
|
{
|
|
namespace partition
|
|
{
|
|
|
|
class RecursiveBisection
|
|
{
|
|
public:
|
|
RecursiveBisection(std::size_t maximum_cell_size,
|
|
double balance,
|
|
double boundary_factor,
|
|
std::size_t num_optimizing_cuts,
|
|
BisectionGraph &bisection_graph);
|
|
|
|
private:
|
|
BisectionGraph &bisection_graph;
|
|
RecursiveBisectionState internal_state;
|
|
|
|
// on larger graphs, SCCs give perfect cuts (think Amerika vs Europe)
|
|
// This function performs an initial pre-partitioning using these sccs.
|
|
std::vector<GraphView> FakeFirstPartitionWithSCC(const std::size_t small_component_size);
|
|
};
|
|
|
|
} // namespace partition
|
|
} // namespace osrm
|
|
|
|
#endif // OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|