Skip to content

Avoid graph dependency - #1950

Merged
karussell merged 4 commits into
masterfrom
avoid_graph_dependency
Mar 10, 2020
Merged

karussell merged 4 commits into
masterfrom
avoid_graph_dependency

Conversation

@karussell

Copy link
Copy Markdown
Member

I think I found a good solution to the graph-dependency problem with always have in the Weighting: now we can fetch the tower nodes only (should be similar fast) without a NodeAccess only via the EdgeIteratorState without introducing a new method.

And additionally I found a minor speed improvement (moved BBox creation out of the loop).

This also helps making stuff in #1776 easier.

@karussell karussell added this to the 1.0 milestone Mar 10, 2020
@karussell
karussell merged commit 5d85cc3 into master Mar 10, 2020
@easbar

easbar commented Mar 11, 2020

Copy link
Copy Markdown
Member

Nice! Maybe we should add some constants or an enum for mode=0,1,2,3,4?

@karussell

karussell commented Mar 12, 2020 •

Copy link
Copy Markdown
Member Author

enums would be clearer but they make the call so long :) ?

fetchWayGeometry(ONLY_PILLAR_NODES)
fetchWayGeometry(BASE_AND_PILLAR_NODES)
fetchWayGeometry(PILLAR_AND_ADJ_NODES)
fetchWayGeometry(ALL_NODES)
fetchWayGeometry(TOWER_NODES_ONLY)

or we remove NODES from them ...

@easbar

easbar commented Mar 13, 2020

Copy link
Copy Markdown
Member

Ok but whats the problem with the long names? So far every time I see fetchWayGeometry I find myself rereading the method to figure out what e.g. mode=2 means... Yes we could go without the NODES in the names: PILLAR_ONLY, PILLAR_AND_BASE, PILLAR_AND_ADJ, ALL, TOWER_ONLY.

@karussell

Copy link
Copy Markdown
Member Author

I find the numbers kind of logical, but obviously it is not ;) ... so, will introduce the enum!

@karussell

Copy link
Copy Markdown
Member Author

PILLAR_AND_BASE

If you have no objections I will use BASE_AND_PILLAR to indicate the order is "base+pillar nodes" and not "pillar nodes + base".

@easbar

easbar commented Mar 14, 2020

Copy link
Copy Markdown
Member

Ah you mean the order in the returned point list? Yes that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants