Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
themylogin committed Jan 27, 2021
1 parent d9d8739 commit b0b8069
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
17 changes: 9 additions & 8 deletions include/extractor/intersection/intersection_analysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ IntersectionView getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
const TurnLanesIndexedArray &turn_lanes_data,
const IntersectionEdge &incoming_edge);

IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph,
const EdgeBasedNodeDataContainer &node_data_container,
const RestrictionMap &node_restriction_map,
const std::unordered_set<NodeID> &barrier_nodes,
const TurnLanesIndexedArray &turn_lanes_data,
const IntersectionEdge &incoming_edge,
const IntersectionEdgeGeometries &edge_geometries,
const std::unordered_set<EdgeID> &merged_edge_ids);
IntersectionView
getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph,
const EdgeBasedNodeDataContainer &node_data_container,
const RestrictionMap &node_restriction_map,
const std::unordered_set<NodeID> &barrier_nodes,
const TurnLanesIndexedArray &turn_lanes_data,
const IntersectionEdge &incoming_edge,
const IntersectionEdgeGeometries &edge_geometries,
const std::unordered_set<EdgeID> &merged_edge_ids);

// Graph Compression cannot compress every setting. For example any barrier/traffic light cannot
// be compressed. As a result, a simple road of the form `a ----- b` might end up as having an
Expand Down
21 changes: 11 additions & 10 deletions src/extractor/edge_based_graph_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,15 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
++node_based_edge_counter;

const auto connected_roads =
extractor::intersection::getConnectedRoadsForEdgeGeometries(m_node_based_graph,
m_edge_based_node_container,
unconditional_node_restriction_map,
m_barrier_nodes,
turn_lanes_data,
incoming_edge,
edge_geometries,
merged_edge_ids);
extractor::intersection::getConnectedRoadsForEdgeGeometries(
m_node_based_graph,
m_edge_based_node_container,
unconditional_node_restriction_map,
m_barrier_nodes,
turn_lanes_data,
incoming_edge,
edge_geometries,
merged_edge_ids);

// check if this edge is part of a restriction via-way
const auto is_restriction_via_edge =
Expand Down Expand Up @@ -770,8 +771,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
}
else
{
// It does not add incoming edge if there is outgoing so we should
// find it ourselves
// It does not add incoming edge if there is outgoing so we
// should find it ourselves
is_incoming = false;
auto reversed_edge = m_node_based_graph.FindEdge(
m_node_based_graph.GetTarget(connected_edge.eid),
Expand Down
26 changes: 14 additions & 12 deletions src/extractor/intersection/intersection_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,15 @@ IntersectionView getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
merged_edge_ids);
}

IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph,
const EdgeBasedNodeDataContainer &node_data_container,
const RestrictionMap &node_restriction_map,
const std::unordered_set<NodeID> &barrier_nodes,
const TurnLanesIndexedArray &turn_lanes_data,
const IntersectionEdge &incoming_edge,
const IntersectionEdgeGeometries &edge_geometries,
const std::unordered_set<EdgeID> &merged_edge_ids)
IntersectionView
getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamicGraph &graph,
const EdgeBasedNodeDataContainer &node_data_container,
const RestrictionMap &node_restriction_map,
const std::unordered_set<NodeID> &barrier_nodes,
const TurnLanesIndexedArray &turn_lanes_data,
const IntersectionEdge &incoming_edge,
const IntersectionEdgeGeometries &edge_geometries,
const std::unordered_set<EdgeID> &merged_edge_ids)
{
const auto intersection_node = graph.GetTarget(incoming_edge.edge);
const auto &outgoing_edges = intersection::getOutgoingEdges(graph, intersection_node);
Expand All @@ -776,10 +777,11 @@ IntersectionView getConnectedRoadsForEdgeGeometries(const util::NodeBasedDynamic
const auto &geometry = processed_edge_geometries[index];
const auto remote_node = graph.GetTarget(geometry.eid);
const auto incoming_edge = graph.FindEdge(remote_node, intersection_node);
processed_edge_geometries[edges_number + index] = {incoming_edge,
util::bearing::reverse(geometry.initial_bearing),
util::bearing::reverse(geometry.perceived_bearing),
geometry.segment_length};
processed_edge_geometries[edges_number + index] = {
incoming_edge,
util::bearing::reverse(geometry.initial_bearing),
util::bearing::reverse(geometry.perceived_bearing),
geometry.segment_length};
}

// Enforce ordering of edges by IDs
Expand Down

0 comments on commit b0b8069

Please sign in to comment.