Merge branch 'master' into sf-stop-sign
This commit is contained in:
@@ -44,8 +44,8 @@ class CompressedEdgeContainer
|
||||
|
||||
void AddUncompressedEdge(const EdgeID edge_id,
|
||||
const NodeID target_node,
|
||||
const SegmentWeight weight,
|
||||
const SegmentWeight duration);
|
||||
const EdgeWeight weight,
|
||||
const EdgeDuration duration);
|
||||
|
||||
void InitializeBothwayVector();
|
||||
unsigned ZipEdges(const unsigned f_edge_pos, const unsigned r_edge_pos);
|
||||
@@ -67,8 +67,8 @@ class CompressedEdgeContainer
|
||||
std::unique_ptr<SegmentDataContainer> ToSegmentData();
|
||||
|
||||
private:
|
||||
SegmentWeight ClipWeight(const SegmentWeight weight);
|
||||
SegmentDuration ClipDuration(const SegmentDuration duration);
|
||||
SegmentWeight ClipWeight(const EdgeWeight weight);
|
||||
SegmentDuration ClipDuration(const EdgeDuration duration);
|
||||
|
||||
int free_list_maximum = 0;
|
||||
std::atomic_size_t clipped_weights{0};
|
||||
|
||||
@@ -16,14 +16,14 @@ struct EdgeBasedEdge
|
||||
struct EdgeData
|
||||
{
|
||||
EdgeData()
|
||||
: turn_id(0), weight(0), distance(0), duration(0), forward(false), backward(false)
|
||||
: turn_id(0), weight{0}, distance{0}, duration(0), forward(false), backward(false)
|
||||
{
|
||||
}
|
||||
|
||||
EdgeData(const NodeID turn_id,
|
||||
const EdgeWeight weight,
|
||||
const EdgeDistance distance,
|
||||
const EdgeWeight duration,
|
||||
const EdgeDuration duration,
|
||||
const bool forward,
|
||||
const bool backward)
|
||||
: turn_id(turn_id), weight(weight), distance(distance), duration(duration),
|
||||
@@ -34,7 +34,7 @@ struct EdgeBasedEdge
|
||||
NodeID turn_id; // ID of the edge based node (node based edge)
|
||||
EdgeWeight weight;
|
||||
EdgeDistance distance;
|
||||
EdgeWeight duration : 30;
|
||||
EdgeDuration::value_type duration : 30;
|
||||
std::uint32_t forward : 1;
|
||||
std::uint32_t backward : 1;
|
||||
|
||||
@@ -47,7 +47,7 @@ struct EdgeBasedEdge
|
||||
const NodeID target,
|
||||
const NodeID edge_id,
|
||||
const EdgeWeight weight,
|
||||
const EdgeWeight duration,
|
||||
const EdgeDuration duration,
|
||||
const EdgeDistance distance,
|
||||
const bool forward,
|
||||
const bool backward);
|
||||
@@ -72,7 +72,7 @@ inline EdgeBasedEdge::EdgeBasedEdge(const NodeID source,
|
||||
const NodeID target,
|
||||
const NodeID turn_id,
|
||||
const EdgeWeight weight,
|
||||
const EdgeWeight duration,
|
||||
const EdgeDuration duration,
|
||||
const EdgeDistance distance,
|
||||
const bool forward,
|
||||
const bool backward)
|
||||
|
||||
@@ -93,7 +93,7 @@ class EdgeBasedGraphFactory
|
||||
void GetEdgeBasedEdges(util::DeallocatingVector<EdgeBasedEdge> &edges);
|
||||
void GetEdgeBasedNodeSegments(std::vector<EdgeBasedNodeSegment> &nodes);
|
||||
void GetEdgeBasedNodeWeights(std::vector<EdgeWeight> &output_node_weights);
|
||||
void GetEdgeBasedNodeDurations(std::vector<EdgeWeight> &output_node_durations);
|
||||
void GetEdgeBasedNodeDurations(std::vector<EdgeDuration> &output_node_durations);
|
||||
void GetEdgeBasedNodeDistances(std::vector<EdgeDistance> &output_node_distances);
|
||||
std::uint32_t GetConnectivityChecksum() const;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ struct InternalExtractorEdge
|
||||
WeightData weight_data,
|
||||
DurationData duration_data,
|
||||
util::Coordinate source_coordinate)
|
||||
: result(source, target, 0, 0, 0, {}, -1, {}), weight_data(weight_data),
|
||||
: result(source, target, {0}, {0}, {0}, {}, -1, {}), weight_data(weight_data),
|
||||
duration_data(duration_data), source_coordinate(source_coordinate)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ inline NodeBasedEdgeClassification::NodeBasedEdgeClassification()
|
||||
}
|
||||
|
||||
inline NodeBasedEdge::NodeBasedEdge()
|
||||
: source(SPECIAL_NODEID), target(SPECIAL_NODEID), weight(0), duration(0), distance(0),
|
||||
: source(SPECIAL_NODEID), target(SPECIAL_NODEID), weight{0}, duration{0}, distance{0},
|
||||
annotation_data(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ struct ProfileProperties
|
||||
|
||||
double GetMaxTurnWeight() const
|
||||
{
|
||||
return std::numeric_limits<TurnPenalty>::max() / GetWeightMultiplier();
|
||||
return from_alias<double>(MAXIMAL_TURN_PENALTY) / GetWeightMultiplier();
|
||||
}
|
||||
|
||||
//! penalty to cross a traffic light in deci-seconds
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
#define OSRM_EXTRACTOR_RESTRICTION_GRAPH_HPP_
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include "util/node_based_graph.hpp"
|
||||
#include "util/std_hash.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
@@ -112,10 +114,10 @@ struct RestrictionGraph
|
||||
RestrictionRange GetRestrictions(RestrictionID id) const;
|
||||
|
||||
// A compressed node-based edge can only have one start node in the restriction graph.
|
||||
boost::unordered_map<EdgeKey, RestrictionID> start_edge_to_node{};
|
||||
std::unordered_map<EdgeKey, RestrictionID> start_edge_to_node{};
|
||||
// A compressed node-based edge can have multiple via nodes in the restriction graph
|
||||
// (as the compressed edge can appear in paths with different prefixes).
|
||||
boost::unordered_multimap<EdgeKey, RestrictionID> via_edge_to_node{};
|
||||
std::unordered_multimap<EdgeKey, RestrictionID> via_edge_to_node{};
|
||||
std::vector<RestrictionNode> nodes;
|
||||
// TODO: Investigate reusing DynamicGraph. Currently it requires specific attributes
|
||||
// (e.g. reversed, weight) that would not make sense for restrictions.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
#include <unordered_set>
|
||||
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
@@ -43,9 +43,9 @@ class TurnPathCompressor
|
||||
// via nodes are the same.
|
||||
// Similarly, we do not compress the instruction via node in a maneuver override, as we need
|
||||
// this to identify the location of the maneuver during routing path-processing.
|
||||
boost::unordered_multimap<NodeID, TurnPath *> starts;
|
||||
boost::unordered_multimap<NodeID, TurnPath *> vias;
|
||||
boost::unordered_multimap<NodeID, TurnPath *> ends;
|
||||
std::unordered_multimap<NodeID, TurnPath *> starts;
|
||||
std::unordered_multimap<NodeID, TurnPath *> vias;
|
||||
std::unordered_multimap<NodeID, TurnPath *> ends;
|
||||
};
|
||||
|
||||
} // namespace extractor
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#ifndef OSRM_EXTRACTOR_WAY_RESTRICTION_MAP_HPP_
|
||||
#define OSRM_EXTRACTOR_WAY_RESTRICTION_MAP_HPP_
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// to access the turn restrictions
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include "extractor/restriction.hpp"
|
||||
#include "extractor/restriction_graph.hpp"
|
||||
#include "util/integer_range.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
// to access the turn restrictions
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
|
||||
Reference in New Issue
Block a user