Class AbstractNearbyDistanceMatrixDemand<Origin_,Destination_,ChildSelector_,ReplayingSelector_>

java.lang.Object
org.optaplanner.core.impl.heuristic.selector.common.nearby.AbstractNearbyDistanceMatrixDemand<Origin_,Destination_,ChildSelector_,ReplayingSelector_>
Type Parameters:
Origin_ - planning entities
Destination_ - planning entities XOR planning values
ChildSelector_ -
ReplayingSelector_ -
All Implemented Interfaces:
Demand<NearbyDistanceMatrix<Origin_,Destination_>>

public abstract class AbstractNearbyDistanceMatrixDemand<Origin_,Destination_,ChildSelector_,ReplayingSelector_> extends Object implements Demand<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.