Currently we use three arrays in RouteParameters to represent locations for source/destinations:
coordinates which contains the coordinates in the order they are passed as loc, dst or src respectively
is_source boolean array of size coordinates.size() that saves for each coodinate if can be used as source
is_destination boolean array of size coordinates.size() that saves for each coordinate if it can be used as destination
The format of boolean arrays is unfortunate because it potentially leads to inefficient StaticRTree queries that are the bottleneck for most table computations (especially in the unsymmetrical case with duplicate coordinates).
is_source -> sources: Array of indices to coordinates array
is_destination -> destinations: Array of indices to destinations array
- Adapt
RouteParamters to insert indices on AddCoordinate AddSource AddDestination
- Adapt
distance_table to use indices array instead of filling coordinate arrays
- Adapt many_to_many to use one coordinate array and two indices arrays.
@daniel-j-h @MoKob if you feel like taking a stab at this let me know.
Currently we use three arrays in
RouteParametersto represent locations for source/destinations:coordinateswhich contains the coordinates in the order they are passed asloc,dstorsrcrespectivelyis_sourceboolean array of sizecoordinates.size()that saves for each coodinate if can be used as sourceis_destinationboolean array of sizecoordinates.size()that saves for each coordinate if it can be used as destinationThe format of boolean arrays is unfortunate because it potentially leads to inefficient StaticRTree queries that are the bottleneck for most table computations (especially in the unsymmetrical case with duplicate coordinates).
is_source->sources: Array of indices to coordinates arrayis_destination->destinations: Array of indices to destinations arrayRouteParamtersto insert indices on AddCoordinate AddSource AddDestinationdistance_tableto use indices array instead of filling coordinate arrays@daniel-j-h @MoKob if you feel like taking a stab at this let me know.