public static class FastVehicleRoutingTransportCostsMatrix.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
FastVehicleRoutingTransportCostsMatrix.Builder |
addTransportDistance(int fromIndex,
int toIndex,
double distance)
Adds a transport-distance for a particular relation.
|
FastVehicleRoutingTransportCostsMatrix.Builder |
addTransportTime(int fromIndex,
int toIndex,
double time)
Adds transport-time for a particular relation.
|
FastVehicleRoutingTransportCostsMatrix.Builder |
addTransportTimeAndDistance(int fromIndex,
int toIndex,
double time,
double distance) |
FastVehicleRoutingTransportCostsMatrix |
build()
Builds the matrix.
|
static FastVehicleRoutingTransportCostsMatrix.Builder |
newInstance(int noLocations,
boolean isSymmetric)
Creates a new builder returning the matrix-builder.
|
public static FastVehicleRoutingTransportCostsMatrix.Builder newInstance(int noLocations, boolean isSymmetric)
If you want to consider symmetric matrices, set isSymmetric to true.
isSymmetric - true if matrix is symmetric, false otherwisepublic FastVehicleRoutingTransportCostsMatrix.Builder addTransportDistance(int fromIndex, int toIndex, double distance)
fromIndex - from location indextoIndex - to location indexdistance - the distance to be addedpublic FastVehicleRoutingTransportCostsMatrix.Builder addTransportTime(int fromIndex, int toIndex, double time)
fromIndex - from location indextoIndex - to location indextime - the time to be addedpublic FastVehicleRoutingTransportCostsMatrix.Builder addTransportTimeAndDistance(int fromIndex, int toIndex, double time, double distance)
public FastVehicleRoutingTransportCostsMatrix build()
Copyright © 2013–2020. All rights reserved.