renamed: Util/* -> util/*
This commit is contained in:
+10
-10
@@ -27,10 +27,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../data_structures/percent.hpp"
|
||||
#include "../data_structures/query_edge.hpp"
|
||||
#include "../data_structures/static_graph.hpp"
|
||||
#include "../Util/integer_range.hpp"
|
||||
#include "../Util/graph_loader.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../Util/osrm_exception.hpp"
|
||||
#include "../util/integer_range.hpp"
|
||||
#include "../util/graph_loader.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
#include "../util/osrm_exception.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
@@ -86,17 +86,17 @@ int main(int argc, char *argv[])
|
||||
if (SPECIAL_EDGEID == edge_id_1)
|
||||
{
|
||||
throw osrm::exception("cannot find first segment of edge (" +
|
||||
std::to_string(node_u) + "," + std::to_string(data.id) +
|
||||
"," + std::to_string(node_v) + "), eid: " +
|
||||
std::to_string(eid));
|
||||
std::to_string(node_u) + "," + std::to_string(data.id) +
|
||||
"," + std::to_string(node_v) + "), eid: " +
|
||||
std::to_string(eid));
|
||||
}
|
||||
const EdgeID edge_id_2 = m_query_graph->FindEdgeInEitherDirection(data.id, node_v);
|
||||
if (SPECIAL_EDGEID == edge_id_2)
|
||||
{
|
||||
throw osrm::exception("cannot find second segment of edge (" +
|
||||
std::to_string(node_u) + "," + std::to_string(data.id) +
|
||||
"," + std::to_string(node_v) + "), eid: " +
|
||||
std::to_string(eid));
|
||||
std::to_string(node_u) + "," + std::to_string(data.id) +
|
||||
"," + std::to_string(node_v) + "), eid: " +
|
||||
std::to_string(eid));
|
||||
}
|
||||
}
|
||||
progress.printStatus(node_u);
|
||||
|
||||
+28
-35
@@ -29,15 +29,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../algorithms/tiny_components.hpp"
|
||||
#include "../data_structures/static_graph.hpp"
|
||||
#include "../data_structures/coordinate_calculation.hpp"
|
||||
#include "../Util/fingerprint.hpp"
|
||||
#include "../Util/graph_loader.hpp"
|
||||
#include "../Util/make_unique.hpp"
|
||||
#include "../Util/osrm_exception.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../util/fingerprint.hpp"
|
||||
#include "../util/graph_loader.hpp"
|
||||
#include "../util/make_unique.hpp"
|
||||
#include "../util/osrm_exception.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#if defined(__APPLE__) || defined (_WIN32)
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#include <gdal.h>
|
||||
#include <ogrsf_frmts.h>
|
||||
#else
|
||||
@@ -52,7 +52,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
|
||||
struct TarjanEdgeData
|
||||
{
|
||||
@@ -129,15 +130,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// load graph data
|
||||
std::vector<ImportEdge> edge_list;
|
||||
const NodeID number_of_nodes = readBinaryOSRMGraphFromStream(input_stream,
|
||||
edge_list,
|
||||
bollard_node_list,
|
||||
traffic_lights_list,
|
||||
&coordinate_list,
|
||||
restriction_list);
|
||||
const NodeID number_of_nodes =
|
||||
readBinaryOSRMGraphFromStream(input_stream, edge_list, bollard_node_list,
|
||||
traffic_lights_list, &coordinate_list, restriction_list);
|
||||
input_stream.close();
|
||||
|
||||
|
||||
BOOST_ASSERT_MSG(restriction_list.size() == usable_restrictions,
|
||||
"size of restriction_list changed");
|
||||
|
||||
@@ -159,17 +156,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (input_edge.forward)
|
||||
{
|
||||
graph_edge_list.emplace_back(input_edge.source,
|
||||
input_edge.target,
|
||||
(std::max)((int)input_edge.weight, 1),
|
||||
input_edge.name_id);
|
||||
graph_edge_list.emplace_back(input_edge.source, input_edge.target,
|
||||
(std::max)((int)input_edge.weight, 1),
|
||||
input_edge.name_id);
|
||||
}
|
||||
if (input_edge.backward)
|
||||
{
|
||||
graph_edge_list.emplace_back(input_edge.target,
|
||||
input_edge.source,
|
||||
(std::max)((int)input_edge.weight, 1),
|
||||
input_edge.name_id);
|
||||
graph_edge_list.emplace_back(input_edge.target, input_edge.source,
|
||||
(std::max)((int)input_edge.weight, 1),
|
||||
input_edge.name_id);
|
||||
}
|
||||
}
|
||||
edge_list.clear();
|
||||
@@ -185,12 +180,11 @@ int main(int argc, char *argv[])
|
||||
SimpleLogger().Write() << "Starting SCC graph traversal";
|
||||
|
||||
RestrictionMap restriction_map(restriction_list);
|
||||
auto tarjan = osrm::make_unique<TarjanSCC<TarjanGraph>>(graph,
|
||||
restriction_map,
|
||||
bollard_node_list);
|
||||
auto tarjan =
|
||||
osrm::make_unique<TarjanSCC<TarjanGraph>>(graph, restriction_map, bollard_node_list);
|
||||
tarjan->run();
|
||||
SimpleLogger().Write() << "identified: " << tarjan->get_number_of_components()
|
||||
<< " many components";
|
||||
<< " many components";
|
||||
SimpleLogger().Write() << "identified " << tarjan->get_size_one_count() << " size 1 SCCs";
|
||||
|
||||
// output
|
||||
@@ -229,7 +223,8 @@ int main(int argc, char *argv[])
|
||||
throw osrm::exception("Layer creation failed.");
|
||||
}
|
||||
TIMER_STOP(SCC_RUN_SETUP);
|
||||
SimpleLogger().Write() << "shapefile setup took " << TIMER_MSEC(SCC_RUN_SETUP)/1000. << "s";
|
||||
SimpleLogger().Write() << "shapefile setup took " << TIMER_MSEC(SCC_RUN_SETUP) / 1000.
|
||||
<< "s";
|
||||
|
||||
uint64_t total_network_distance = 0;
|
||||
p.reinit(graph->GetNumberOfNodes());
|
||||
@@ -245,18 +240,15 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
total_network_distance +=
|
||||
100 * coordinate_calculation::euclidean_distance(
|
||||
coordinate_list[source].lat,
|
||||
coordinate_list[source].lon,
|
||||
coordinate_list[target].lat,
|
||||
coordinate_list[target].lon);
|
||||
coordinate_list[source].lat, coordinate_list[source].lon,
|
||||
coordinate_list[target].lat, coordinate_list[target].lon);
|
||||
|
||||
BOOST_ASSERT(current_edge != SPECIAL_EDGEID);
|
||||
BOOST_ASSERT(source != SPECIAL_NODEID);
|
||||
BOOST_ASSERT(target != SPECIAL_NODEID);
|
||||
|
||||
const unsigned size_of_containing_component =
|
||||
std::min(tarjan->get_component_size(source),
|
||||
tarjan->get_component_size(target));
|
||||
const unsigned size_of_containing_component = std::min(
|
||||
tarjan->get_component_size(source), tarjan->get_component_size(target));
|
||||
|
||||
// edges that end on bollard nodes may actually be in two distinct components
|
||||
if (size_of_containing_component < 1000)
|
||||
@@ -282,7 +274,8 @@ int main(int argc, char *argv[])
|
||||
OGRSpatialReference::DestroySpatialReference(poSRS);
|
||||
OGRDataSource::DestroyDataSource(poDS);
|
||||
TIMER_STOP(SCC_OUTPUT);
|
||||
SimpleLogger().Write() << "generating output took: " << TIMER_MSEC(SCC_OUTPUT)/1000. << "s";
|
||||
SimpleLogger().Write() << "generating output took: " << TIMER_MSEC(SCC_OUTPUT) / 1000.
|
||||
<< "s";
|
||||
|
||||
SimpleLogger().Write() << "total network distance: "
|
||||
<< (uint64_t)total_network_distance / 100 / 1000. << " km";
|
||||
|
||||
+11
-11
@@ -25,10 +25,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "../Util/git_sha.hpp"
|
||||
#include "../Util/osrm_exception.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../Util/timing_util.hpp"
|
||||
#include "../util/git_sha.hpp"
|
||||
#include "../util/osrm_exception.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
#include "../util/timing_util.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
@@ -63,8 +63,8 @@ void RunStatistics(std::vector<double> &timings_vector, Statistics &stats)
|
||||
double primary_sum = std::accumulate(timings_vector.begin(), timings_vector.end(), 0.0);
|
||||
stats.mean = primary_sum / timings_vector.size();
|
||||
|
||||
double primary_sq_sum = std::inner_product(
|
||||
timings_vector.begin(), timings_vector.end(), timings_vector.begin(), 0.0);
|
||||
double primary_sq_sum = std::inner_product(timings_vector.begin(), timings_vector.end(),
|
||||
timings_vector.begin(), 0.0);
|
||||
stats.dev = std::sqrt(primary_sq_sum / timings_vector.size() - (stats.mean * stats.mean));
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
SimpleLogger().Write() << "Not supported on FreeBSD";
|
||||
return 0;
|
||||
SimpleLogger().Write() << "Not supported on FreeBSD";
|
||||
return 0;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
SimpleLogger().Write() << "Not supported on Windows";
|
||||
return 0;
|
||||
SimpleLogger().Write() << "Not supported on Windows";
|
||||
return 0;
|
||||
#else
|
||||
|
||||
LogPolicy::GetInstance().Unmute();
|
||||
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
|
||||
std::uniform_int_distribution<unsigned> uniform_dist(0, number_of_blocks - 1);
|
||||
for (unsigned i = 0; i < 1000; ++i)
|
||||
{
|
||||
unsigned block_to_read =uniform_dist(e1);
|
||||
unsigned block_to_read = uniform_dist(e1);
|
||||
off_t current_offset = block_to_read * 4096;
|
||||
TIMER_START(random_access);
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -26,10 +26,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../library/osrm.hpp"
|
||||
#include "../Util/git_sha.hpp"
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../Util/routed_options.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../util/git_sha.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
#include "../util/routed_options.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
#include <osrm/libosrm_config.hpp>
|
||||
|
||||
@@ -29,8 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "../data_structures/shared_memory_factory.hpp"
|
||||
#include "../server/data_structures/shared_datatype.hpp"
|
||||
#include "../Util/git_sha.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../util/git_sha.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
|
||||
void delete_region(const SharedDataType region)
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "../Util/git_sha.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../util/git_sha.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
#include "../server/data_structures/shared_barriers.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
Reference in New Issue
Block a user