2017-01-23 05:50:03 -05:00
|
|
|
#ifndef OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|
|
|
|
#define OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|
|
|
|
|
|
|
|
#include "partition/bisection_graph.hpp"
|
2017-01-26 04:34:01 -05:00
|
|
|
#include "partition/graph_view.hpp"
|
2017-01-23 05:50:03 -05:00
|
|
|
#include "partition/recursive_bisection_state.hpp"
|
|
|
|
|
|
|
|
#include <cstddef>
|
2017-01-26 04:34:01 -05:00
|
|
|
#include <vector>
|
2017-01-23 05:50:03 -05:00
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace partition
|
|
|
|
{
|
|
|
|
|
|
|
|
class RecursiveBisection
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RecursiveBisection(std::size_t maximum_cell_size,
|
|
|
|
double balance,
|
|
|
|
double boundary_factor,
|
2017-01-26 11:53:19 -05:00
|
|
|
std::size_t num_optimizing_cuts,
|
2017-01-26 04:34:01 -05:00
|
|
|
BisectionGraph &bisection_graph);
|
2017-01-23 05:50:03 -05:00
|
|
|
|
2017-02-01 09:50:06 -05:00
|
|
|
const std::vector<RecursiveBisectionState::BisectionID> &BisectionIDs() const;
|
|
|
|
|
2017-01-23 05:50:03 -05:00
|
|
|
private:
|
2017-01-26 04:34:01 -05:00
|
|
|
BisectionGraph &bisection_graph;
|
2017-01-23 05:50:03 -05:00
|
|
|
RecursiveBisectionState internal_state;
|
2017-01-26 04:34:01 -05:00
|
|
|
|
|
|
|
// 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);
|
2017-01-23 05:50:03 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace partition
|
|
|
|
} // namespace osrm
|
|
|
|
|
|
|
|
#endif // OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|