replace boost integer range
This commit is contained in:
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../DataStructures/DynamicGraph.h"
|
||||
#include "../DataStructures/Percent.h"
|
||||
#include "../DataStructures/QueryEdge.h"
|
||||
#include "../DataStructures/Range.h"
|
||||
#include "../DataStructures/XORFastHash.h"
|
||||
#include "../DataStructures/XORFastHashStorage.h"
|
||||
#include "../Util/SimpleLogger.h"
|
||||
@@ -41,7 +42,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range/irange.hpp>
|
||||
|
||||
#include <stxxl/vector>
|
||||
|
||||
@@ -360,7 +360,7 @@ class Contractor
|
||||
|
||||
// build forward and backward renumbering map and remap ids in remaining_nodes and
|
||||
// Priorities.
|
||||
for (const auto new_node_id : boost::irange(0u, (unsigned)remaining_nodes.size()))
|
||||
for (const auto new_node_id : osrm::irange<std::size_t>(0, remaining_nodes.size()))
|
||||
{
|
||||
// create renumbering maps in both directions
|
||||
orig_node_id_to_new_id_map[new_node_id] = remaining_nodes[new_node_id].id;
|
||||
@@ -370,7 +370,7 @@ class Contractor
|
||||
remaining_nodes[new_node_id].id = new_node_id;
|
||||
}
|
||||
// walk over all nodes
|
||||
for (const auto i : boost::irange(0u, (unsigned)contractor_graph->GetNumberOfNodes()))
|
||||
for (const auto i : osrm::irange<std::size_t>(0, contractor_graph->GetNumberOfNodes()))
|
||||
{
|
||||
const NodeID source = i;
|
||||
for (auto current_edge : contractor_graph->GetAdjacentEdgeRange(source))
|
||||
@@ -560,7 +560,7 @@ class Contractor
|
||||
if (contractor_graph->GetNumberOfNodes())
|
||||
{
|
||||
Edge new_edge;
|
||||
for (const auto node : boost::irange(0u, number_of_nodes))
|
||||
for (const auto node : osrm::irange(0u, number_of_nodes))
|
||||
{
|
||||
p.printStatus(node);
|
||||
for (auto edge : contractor_graph->GetAdjacentEdgeRange(node))
|
||||
@@ -848,7 +848,7 @@ class Contractor
|
||||
std::sort(neighbours.begin(), neighbours.end());
|
||||
neighbours.resize(std::unique(neighbours.begin(), neighbours.end()) - neighbours.begin());
|
||||
|
||||
for (const auto i : boost::irange(0u, (unsigned)neighbours.size()))
|
||||
for (const auto i : osrm::irange<std::size_t>(0, neighbours.size()))
|
||||
{
|
||||
contractor_graph->DeleteEdgesTo(neighbours[i], node);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "EdgeBasedGraphFactory.h"
|
||||
#include "../Algorithms/BFSComponentExplorer.h"
|
||||
#include "../DataStructures/Percent.h"
|
||||
#include "../DataStructures/Range.h"
|
||||
#include "../Util/ComputeAngle.h"
|
||||
#include "../Util/LuaUtil.h"
|
||||
#include "../Util/SimpleLogger.h"
|
||||
#include "../Util/TimingUtil.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
@@ -134,7 +134,7 @@ EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID u, const NodeID v, const
|
||||
// TODO: move to lambda function with C++11
|
||||
int temp_sum = 0;
|
||||
|
||||
for (const auto i : boost::irange(0u, geometry_size))
|
||||
for (const auto i : osrm::irange(0u, geometry_size))
|
||||
{
|
||||
forward_dist_prefix_sum[i] = temp_sum;
|
||||
temp_sum += forward_geometry[i].second;
|
||||
@@ -143,7 +143,7 @@ EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID u, const NodeID v, const
|
||||
}
|
||||
|
||||
temp_sum = 0;
|
||||
for (const auto i : boost::irange(0u, geometry_size))
|
||||
for (const auto i : osrm::irange(0u, geometry_size))
|
||||
{
|
||||
temp_sum += reverse_geometry[reverse_geometry.size() - 1 - i].second;
|
||||
reverse_dist_prefix_sum[i] = reverse_data.distance - temp_sum;
|
||||
@@ -162,7 +162,7 @@ EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID u, const NodeID v, const
|
||||
}
|
||||
|
||||
// traverse arrays from start and end respectively
|
||||
for (const auto i : boost::irange(0u, geometry_size))
|
||||
for (const auto i : osrm::irange(0u, geometry_size))
|
||||
{
|
||||
BOOST_ASSERT(current_edge_source_coordinate_id ==
|
||||
reverse_geometry[geometry_size - 1 - i].first);
|
||||
@@ -287,7 +287,7 @@ void EdgeBasedGraphFactory::CompressGeometry()
|
||||
Percent p(original_number_of_nodes);
|
||||
unsigned removed_node_count = 0;
|
||||
|
||||
for (const NodeID v : boost::irange(0u, original_number_of_nodes))
|
||||
for (const NodeID v : osrm::irange(0u, original_number_of_nodes))
|
||||
{
|
||||
p.printStatus(v);
|
||||
|
||||
@@ -418,7 +418,7 @@ void EdgeBasedGraphFactory::CompressGeometry()
|
||||
unsigned new_node_count = 0;
|
||||
unsigned new_edge_count = 0;
|
||||
|
||||
for(const auto i : boost::irange(0u, m_node_based_graph->GetNumberOfNodes()))
|
||||
for(const auto i : osrm::irange(0u, m_node_based_graph->GetNumberOfNodes()))
|
||||
{
|
||||
if (m_node_based_graph->GetOutDegree(i) > 0)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../Algorithms/IteratorBasedCRC32.h"
|
||||
#include "../DataStructures/BinaryHeap.h"
|
||||
#include "../DataStructures/DeallocatingVector.h"
|
||||
#include "../DataStructures/Range.h"
|
||||
#include "../DataStructures/StaticRTree.h"
|
||||
#include "../DataStructures/RestrictionMap.h"
|
||||
|
||||
@@ -45,7 +46,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <tbb/task_scheduler_init.h>
|
||||
#include <tbb/parallel_sort.h>
|
||||
@@ -232,7 +232,7 @@ int Prepare::Process(int argc, char *argv[])
|
||||
StaticGraph<EdgeData>::EdgeIterator last_edge = edge;
|
||||
|
||||
// initializing 'first_edge'-field of nodes:
|
||||
for (const auto node : boost::irange(0u, max_used_node_id))
|
||||
for (const auto node : osrm::irange(0u, max_used_node_id))
|
||||
{
|
||||
last_edge = edge;
|
||||
while ((edge < contracted_edge_count) && (contracted_edge_list[edge].source == node))
|
||||
@@ -243,7 +243,7 @@ int Prepare::Process(int argc, char *argv[])
|
||||
position += edge - last_edge; // remove
|
||||
}
|
||||
|
||||
for (const auto sentinel_counter : boost::irange(max_used_node_id, (unsigned)node_array.size()))
|
||||
for (const auto sentinel_counter : osrm::irange<unsigned>(max_used_node_id, node_array.size()))
|
||||
{
|
||||
// sentinel element, guarded against underflow
|
||||
node_array[sentinel_counter].first_edge = contracted_edge_count;
|
||||
@@ -271,7 +271,7 @@ int Prepare::Process(int argc, char *argv[])
|
||||
int number_of_used_edges = 0;
|
||||
|
||||
StaticGraph<EdgeData>::EdgeArrayEntry current_edge;
|
||||
for (const auto edge : boost::irange(0u, (unsigned)contracted_edge_list.size()))
|
||||
for (const auto edge : osrm::irange<std::size_t>(0, contracted_edge_list.size()))
|
||||
{
|
||||
// no eigen loops
|
||||
BOOST_ASSERT(contracted_edge_list[edge].source != contracted_edge_list[edge].target);
|
||||
|
||||
Reference in New Issue
Block a user