-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor nodes file #4036
Refactor nodes file #4036
Conversation
Changed sizes:
|
0d495bd
to
2a3f890
Compare
3969e88
to
e699a4a
Compare
@TheMarex With the current implementation size of |
Size reduction for modified files of
EDIT: single-threaded extraction results for the branch and master
|
Runtime memory consumption for CH+MLD
to
because part of |
@oxidase is that a measurement against |
@TheMarex no, it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just some smaller naming related things. 👍
@@ -93,7 +93,8 @@ class EdgeBasedGraphFactory | |||
|
|||
// The following get access functions destroy the content in the factory | |||
void GetEdgeBasedEdges(util::DeallocatingVector<EdgeBasedEdge> &edges); | |||
void GetEdgeBasedNodes(std::vector<EdgeBasedNode> &nodes); | |||
void GetEdgeBasedNodes(EdgeBasedNodeDataContainer &ebg_node_data_container); | |||
void GetNodeBasedEdges(std::vector<EdgeBasedNode> &nodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming here is a little bit confusing. This function returns a EdgeBasedNode
but is named GetNodeBasedEdge
. I think we should rename that class, it does not represent a single EdgeBasedNode
but actually a single segment. Maybe ExternalSegmentData
?
@@ -65,6 +68,13 @@ template <storage::Ownership Ownership> class EdgeBasedNodeDataContainerImpl | |||
travel_modes[node_id] = travel_mode; | |||
} | |||
|
|||
// Used by EdgeBasedGraphFactory to fill data structure | |||
template <typename = std::enable_if<Ownership == storage::Ownership::Container>> | |||
void SetData(NodeID node_id, ComponentID component_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a less generic name: SetComponentID
.
b76ba89
to
5bfb104
Compare
@@ -359,18 +362,6 @@ void Extractor::FindComponents(unsigned max_edge_id, | |||
} | |||
} | |||
|
|||
// connect forward and backward nodes of each edge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is necessary to enforce that the component ID of the forward and backward node is the same (the implicit assumption is that we are always about to do a u-turn on the spot). There are of course cases where this is generally not true, but we can't handle these right now anyway (for that we would need to split the PhantomNode into forward/backward and have two component IDs).
@TheMarex as discussed per chat |
5bfb104
to
75e6808
Compare
75e6808
to
7a26333
Compare
7a26333
to
3ee629f
Compare
Issue
PR fixes #4028
Tasklist
fileIndex
,nodes
andnodes_data
files[ ] Use Geometry views to prevent vector copiesgermany-latest.osm.pbf
Requirements / Relations
PR partially duplicates #3446