Rename namespace partition to partitioner

Rename module partition to partitioner.
This cultivates naming used in existing modules like extractor,
customizer, etc. - noun vs verb (word partition is both though).
This commit is contained in:
Mateusz Loskot
2018-02-01 16:47:43 +01:00
committed by Patrick Niklaus
parent 03f598b93d
commit 8114104a43
61 changed files with 308 additions and 305 deletions
+13 -13
View File
@@ -5,10 +5,10 @@
#include "customizer/edge_based_graph.hpp"
#include "customizer/files.hpp"
#include "partition/cell_storage.hpp"
#include "partition/edge_based_graph_reader.hpp"
#include "partition/files.hpp"
#include "partition/multi_level_partition.hpp"
#include "partitioner/cell_storage.hpp"
#include "partitioner/edge_based_graph_reader.hpp"
#include "partitioner/files.hpp"
#include "partitioner/multi_level_partition.hpp"
#include "storage/shared_memory_ownership.hpp"
@@ -79,7 +79,7 @@ void CellStorageStatistics(const Graph &graph,
}
auto LoadAndUpdateEdgeExpandedGraph(const CustomizationConfig &config,
const partition::MultiLevelPartition &mlp)
const partitioner::MultiLevelPartition &mlp)
{
updater::Updater updater(config.updater_config);
@@ -87,16 +87,16 @@ auto LoadAndUpdateEdgeExpandedGraph(const CustomizationConfig &config,
std::vector<extractor::EdgeBasedEdge> edge_based_edge_list;
std::tie(num_nodes, edge_based_edge_list) = updater.LoadAndUpdateEdgeExpandedGraph();
auto directed = partition::splitBidirectionalEdges(edge_based_edge_list);
auto directed = partitioner::splitBidirectionalEdges(edge_based_edge_list);
auto tidied =
partition::prepareEdgesForUsageInGraph<StaticEdgeBasedGraphEdge>(std::move(directed));
partitioner::prepareEdgesForUsageInGraph<StaticEdgeBasedGraphEdge>(std::move(directed));
auto edge_based_graph = customizer::MultiLevelEdgeBasedGraph(mlp, num_nodes, std::move(tidied));
return edge_based_graph;
}
std::vector<CellMetric> customizeFilteredMetrics(const MultiLevelEdgeBasedGraph &graph,
const partition::CellStorage &storage,
const partitioner::CellStorage &storage,
const CellCustomizer &customizer,
const std::vector<std::vector<bool>> &node_filters)
{
@@ -117,15 +117,15 @@ int Customizer::Run(const CustomizationConfig &config)
{
TIMER_START(loading_data);
partition::MultiLevelPartition mlp;
partition::files::readPartition(config.GetPath(".osrm.partition"), mlp);
partitioner::MultiLevelPartition mlp;
partitioner::files::readPartition(config.GetPath(".osrm.partition"), mlp);
auto graph = LoadAndUpdateEdgeExpandedGraph(config, mlp);
util::Log() << "Loaded edge based graph: " << graph.GetNumberOfEdges() << " edges, "
<< graph.GetNumberOfNodes() << " nodes";
partition::CellStorage storage;
partition::files::readCells(config.GetPath(".osrm.cells"), storage);
partitioner::CellStorage storage;
partitioner::files::readCells(config.GetPath(".osrm.cells"), storage);
TIMER_STOP(loading_data);
extractor::EdgeBasedNodeDataContainer node_data;
@@ -148,7 +148,7 @@ int Customizer::Run(const CustomizationConfig &config)
util::Log() << "MLD customization writing took " << TIMER_SEC(writing_mld_data) << " seconds";
TIMER_START(writing_graph);
partition::files::writeGraph(config.GetPath(".osrm.mldgr"), graph);
partitioner::files::writeGraph(config.GetPath(".osrm.mldgr"), graph);
TIMER_STOP(writing_graph);
util::Log() << "Graph writing took " << TIMER_SEC(writing_graph) << " seconds";