Rename GraphView -> BisectionGraphView to avoid name conflicts
This commit is contained in:
committed by
Patrick Niklaus
parent
e23dc8977f
commit
53f87c08b5
@@ -1,5 +1,5 @@
|
||||
#ifndef OSRM_PARTITION_GRAPHVIEW_HPP_
|
||||
#define OSRM_PARTITION_GRAPHVIEW_HPP_
|
||||
#ifndef OSRM_PARTITION_BISECTION_GRAPHVIEW_HPP_
|
||||
#define OSRM_PARTITION_BISECTION_GRAPHVIEW_HPP_
|
||||
|
||||
#include "partition/bisection_graph.hpp"
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace partition
|
||||
|
||||
// Non-owning immutable sub-graph view into a base graph.
|
||||
// The part of the graph to select is determined by the recursive bisection state.
|
||||
class GraphView
|
||||
class BisectionGraphView
|
||||
{
|
||||
public:
|
||||
using ConstNodeIterator = BisectionGraph::ConstNodeIterator;
|
||||
@@ -26,13 +26,13 @@ class GraphView
|
||||
using EdgeT = BisectionGraph::EdgeT;
|
||||
|
||||
// Construction either for a subrange, or for a full range
|
||||
GraphView(const BisectionGraph &graph);
|
||||
GraphView(const BisectionGraph &graph,
|
||||
BisectionGraphView(const BisectionGraph &graph);
|
||||
BisectionGraphView(const BisectionGraph &graph,
|
||||
const ConstNodeIterator begin,
|
||||
const ConstNodeIterator end);
|
||||
|
||||
// construction from a different view, no need to keep the graph around
|
||||
GraphView(const GraphView &view, const ConstNodeIterator begin, const ConstNodeIterator end);
|
||||
BisectionGraphView(const BisectionGraphView &view, const ConstNodeIterator begin, const ConstNodeIterator end);
|
||||
|
||||
// Number of nodes _in this sub-graph.
|
||||
std::size_t NumberOfNodes() const;
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef OSRM_PARTITION_DINIC_MAX_FLOW_HPP_
|
||||
#define OSRM_PARTITION_DINIC_MAX_FLOW_HPP_
|
||||
|
||||
#include "partition/graph_view.hpp"
|
||||
#include "partition/bisection_graph_view.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
@@ -31,12 +31,12 @@ class DinicMaxFlow
|
||||
// input parameter storing the set o
|
||||
using SourceSinkNodes = std::unordered_set<NodeID>;
|
||||
|
||||
MinCut operator()(const GraphView &view,
|
||||
MinCut operator()(const BisectionGraphView &view,
|
||||
const SourceSinkNodes &source_nodes,
|
||||
const SourceSinkNodes &sink_nodes) const;
|
||||
|
||||
// validates the inpiut parameters to the flow algorithm (e.g. not intersecting)
|
||||
bool Validate(const GraphView &view,
|
||||
bool Validate(const BisectionGraphView &view,
|
||||
const SourceSinkNodes &source_nodes,
|
||||
const SourceSinkNodes &sink_nodes) const;
|
||||
|
||||
@@ -57,7 +57,7 @@ class DinicMaxFlow
|
||||
// \ /
|
||||
// b
|
||||
// would assign s = 0, a,b = 1, t=2
|
||||
LevelGraph ComputeLevelGraph(const GraphView &view,
|
||||
LevelGraph ComputeLevelGraph(const BisectionGraphView &view,
|
||||
const std::vector<NodeID> &border_source_nodes,
|
||||
const SourceSinkNodes &source_nodes,
|
||||
const SourceSinkNodes &sink_nodes,
|
||||
@@ -68,7 +68,7 @@ class DinicMaxFlow
|
||||
// with increasing level exists from `s` to `t`).
|
||||
std::size_t BlockingFlow(FlowEdges &flow,
|
||||
LevelGraph &levels,
|
||||
const GraphView &view,
|
||||
const BisectionGraphView &view,
|
||||
const SourceSinkNodes &source_nodes,
|
||||
const std::vector<NodeID> &border_sink_nodes) const;
|
||||
|
||||
@@ -78,13 +78,13 @@ class DinicMaxFlow
|
||||
// sink nodes, instead of the source, so we can save a few dfs runs
|
||||
std::vector<NodeID> GetAugmentingPath(LevelGraph &levels,
|
||||
const NodeID from,
|
||||
const GraphView &view,
|
||||
const BisectionGraphView &view,
|
||||
const FlowEdges &flow,
|
||||
const SourceSinkNodes &source_nodes) const;
|
||||
|
||||
// Builds an actual cut result from a level graph
|
||||
MinCut
|
||||
MakeCut(const GraphView &view, const LevelGraph &levels, const std::size_t flow_value) const;
|
||||
MakeCut(const BisectionGraphView &view, const LevelGraph &levels, const std::size_t flow_value) const;
|
||||
};
|
||||
|
||||
} // namespace partition
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#define OSRM_PARTITION_INERTIAL_FLOW_HPP_
|
||||
|
||||
#include "partition/dinic_max_flow.hpp"
|
||||
#include "partition/graph_view.hpp"
|
||||
#include "partition/bisection_graph_view.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace partition
|
||||
{
|
||||
|
||||
DinicMaxFlow::MinCut computeInertialFlowCut(const GraphView &view,
|
||||
DinicMaxFlow::MinCut computeInertialFlowCut(const BisectionGraphView &view,
|
||||
const std::size_t num_slopes,
|
||||
const double balance,
|
||||
const double source_sink_rate);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define OSRM_PARTITION_RECURSIVE_BISECTION_HPP_
|
||||
|
||||
#include "partition/bisection_graph.hpp"
|
||||
#include "partition/graph_view.hpp"
|
||||
#include "partition/recursive_bisection_state.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "partition/bisection_graph.hpp"
|
||||
#include "partition/graph_view.hpp"
|
||||
#include "partition/bisection_graph_view.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
namespace osrm
|
||||
@@ -37,7 +37,7 @@ class RecursiveBisectionState
|
||||
// perform an initial pre-partitioning into small components
|
||||
// on larger graphs, SCCs give perfect cuts (think Amerika vs Europe)
|
||||
// This function performs an initial pre-partitioning using these sccs.
|
||||
std::vector<GraphView> PrePartitionWithSCC(const std::size_t small_component_size);
|
||||
std::vector<BisectionGraphView> PrePartitionWithSCC(const std::size_t small_component_size);
|
||||
|
||||
const std::vector<BisectionID> &BisectionIDs() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user