Class NearbyDistanceMatrixDemand<Solution_,Origin_,Destination_>

java.lang.Object
org.optaplanner.core.impl.heuristic.selector.common.nearby.NearbyDistanceMatrixDemand<Solution_,Origin_,Destination_>
Type Parameters:
Solution_ -
Origin_ -
Destination_ -
All Implemented Interfaces:
Demand<MemoizingSupply<NearbyDistanceMatrix<Origin_,Destination_>>>

public final class NearbyDistanceMatrixDemand<Solution_,Origin_,Destination_> extends Object implements Demand<MemoizingSupply<NearbyDistanceMatrix<Origin_,Destination_>>>
Calculating NearbyDistanceMatrix is very expensive, therefore we want to reuse it as much as possible.

In cases where the demand represents the same nearby selector (as defined by equals(Object)) the SupplyManager ensures that the same supply instance is returned with the pre-computed NearbyDistanceMatrix.