Repository navigation
Conversation
boldtrn
left a comment
There was a problem hiding this comment.
Thanks for your work and sorry for the late review. Your PR looks good to me. Would you mind changing the behavior in GraphHopper.java. I think we can move the whole blocking part after the GenericWeighting has be created. If there is something to block we create the BlockedWeighting, otherwise we continue to use the GenericWeighting.
| GenericWeighting genericWeighting = new GenericWeighting(dataEncoder, cMap); | ||
| genericWeighting.setGraph(graph); | ||
| return genericWeighting; | ||
| BlockedWeighting blockedWeighting = new BlockedWeighting(genericWeighting, cMap); |
There was a problem hiding this comment.
We should only use the BlockedWeighting, if we actually block something, otherwise we could only use the GenericWeighting
There was a problem hiding this comment.
It furthermore should be wrappable with the FastestWeighting and potentially others, but this might be dependent on #940. Will investigate what is possible.
|
I am not sure if you already send us the CLA? BTW: This is not mandatory for this PR, but the overall idea for the BlockedWeighting was that we can use this for all Weightings/Encoders, similar to what we do with the |
|
Thanks for review. I'll try to fix it. Regarding CLA, I'd like to accept it, but I'm not sure how to do it as there is no submit button on that page. Or should I do it in some other way? |
|
Thanks & just send this CLA to the info email here: https://www.graphhopper.com/imprint/ |
|
We'll go on with #1078 as no feedback here. |
Related issue: #958
I'm not sure about one thing: is it OK to change order of checks in GenericWeighting.calcWeight? When using GenericWeighting with BlockedWeighting now it is firstly checked that edge is not blocked and then other checks from GenericWeighting go. Can it affect performance in any way?