K - J - public class JaqamanLinkingCostMatrixCreator<K extends Comparable<K>,J extends Comparable<J>> extends Object implements CostMatrixCreator<K,J>
CostMatrixCreator that can generate a cost matrix from a list of
sources, a list of targets and a CostFunction that can generate a
cost for any combination.| Constructor and Description |
|---|
JaqamanLinkingCostMatrixCreator(Iterable<K> sources,
Iterable<J> targets,
CostFunction<K,J> costFunction,
double costThreshold,
double alternativeCostFactor,
double percentile) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkInput() |
double |
getAlternativeCostForSource(K source)
Returns the value of the no-linking alternative cost for the specified
source.
|
double |
getAlternativeCostForTarget(J target)
Returns the value of the no-linking alternative cost for the specified
target.
|
String |
getErrorMessage() |
long |
getProcessingTime() |
SparseCostMatrix |
getResult()
Returns the cost matrix generated.
|
List<K> |
getSourceList()
Returns the list of sources in the generated cost matrix.
|
List<J> |
getTargetList()
Returns the list of targets in the generated cost matrix.
|
boolean |
process() |
public boolean checkInput()
checkInput in interface Algorithmpublic String getErrorMessage()
getErrorMessage in interface Algorithmpublic SparseCostMatrix getResult()
Careful, it can be null if not acceptable costs have been
found for the specified configuration. In that case, the lists returned
by getSourceList() and getTargetList() are empty.
getResult in interface OutputAlgorithm<SparseCostMatrix>SparseCostMatrix or null.public List<K> getSourceList()
CostMatrixCreatorgetSourceList in interface CostMatrixCreator<K extends Comparable<K>,J extends Comparable<J>>sourceList.get( i ) is
the source corresponding to the row i in the
generated cost matrix.CostMatrixCreator.getTargetList(),
OutputAlgorithm.getResult()public List<J> getTargetList()
CostMatrixCreatorgetTargetList in interface CostMatrixCreator<K extends Comparable<K>,J extends Comparable<J>>targetList.get( j )
is the target corresponding to the column j in the
generated cost matrix.CostMatrixCreator.getSourceList(),
OutputAlgorithm.getResult()public long getProcessingTime()
getProcessingTime in interface Benchmarkpublic double getAlternativeCostForSource(K source)
CostMatrixCreatorgetAlternativeCostForSource in interface CostMatrixCreator<K extends Comparable<K>,J extends Comparable<J>>source - the source object.CostMatrixCreator.getSourceList().public double getAlternativeCostForTarget(J target)
CostMatrixCreatorgetAlternativeCostForTarget in interface CostMatrixCreator<K extends Comparable<K>,J extends Comparable<J>>target - the target object. Belongs to the list returned by
CostMatrixCreator.getTargetList().Copyright © 2015–2021 Fiji. All rights reserved.