You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to refactor the package structure. Especially: com.graphhopper.routing.util. It would make sense to create at least two new subpackages: encoder and weighting. Actually these two packages could be moved to com.graphhopper.routing.
In the package com.graphhopper.routing a subpackage for the algorithms could make sense.
Sounds like a good idea. routing.util is indeed a bit too crowded! I would not split yet the encoder and weighting stuff as the meaning of them will slightly change with the flexibility work: an encoder will relate more to the storage (profile-independent) and weightings are then the real vehicle 'profiles'. But we should move both out of the routing.util somehow - but what name :) ? Or maybe moving encoders to storage(.encoding) and weighting to routing.weighting later maybe rename to routing.profiles?
In the package com.graphhopper.routing a subpackage for the algorithms could make sense.
My approach is rather simplistic: if it is crowded: split it. If not, like I think it is the case for the routing package, then avoid too many sub packages as naming packages is very important and we don't find good names if only a few classes are in the package. Although probably in this case routing.algorithm would be fine, plus routing.algorithm.ch
Or maybe moving encoders to storage(.encoding) and weighting to routing.weighting later maybe rename to routing.profiles?
Yes you are right. Encodings are actually storage related.
If you want, we can add this to #579 or do this in a separate PR after we reduced the number of pending PRs (probably the better approach).
Have now moved subnetwork and weighting stuff into their own package. Encoder remains there (at least for now), as this is work in progress which 'meaning' this has.
Activity
karussell commentedon Nov 30, 2015
Sounds like a good idea.
routing.utilis indeed a bit too crowded! I would not split yet the encoder and weighting stuff as the meaning of them will slightly change with the flexibility work: an encoder will relate more to the storage (profile-independent) and weightings are then the real vehicle 'profiles'. But we should move both out of therouting.utilsomehow - but what name :) ? Or maybe moving encoders tostorage(.encoding)and weighting torouting.weightinglater maybe rename torouting.profiles?My approach is rather simplistic: if it is crowded: split it. If not, like I think it is the case for the
routingpackage, then avoid too many sub packages as naming packages is very important and we don't find good names if only a few classes are in the package. Although probably in this caserouting.algorithmwould be fine, plusrouting.algorithm.chboldtrn commentedon Nov 30, 2015
Yes you are right. Encodings are actually storage related.
If you want, we can add this to #579 or do this in a separate PR after we reduced the number of pending PRs (probably the better approach).
karussell commentedon Nov 30, 2015
I would avoid mixing issues and smaller 'single-purpose' PRs are better IMO :)
But it is no problem to have multiple PRs - except maybe the potential higher refactoring costs can be a problem.
karussell commentedon Sep 12, 2016
Have now moved subnetwork and weighting stuff into their own package. Encoder remains there (at least for now), as this is work in progress which 'meaning' this has.
moved subnetwork code into own package, #583
moving weighting related classes into own package, #583
karussell commentedon May 6, 2020
Will close here for now. See #2016.