DataType
- Type of data to compute the distortion overClusterType
- Type of clusters to usepublic class ParallelClusterDistortionMeasure<DataType,ClusterType extends Cluster<DataType>> extends ClusterDistortionMeasure<DataType,ClusterType> implements ParallelAlgorithm
Constructor and Description |
---|
ParallelClusterDistortionMeasure()
Creates a new instance of ParallelClusterDistortionMeasure
|
ParallelClusterDistortionMeasure(ClusterDivergenceFunction<ClusterType,DataType> costParameters)
Creates a new instance of ClusterDistortionMeasure
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(java.util.Collection<? extends ClusterType> target)
Computes the cost of the given target.
|
int |
getNumThreads()
Gets the number of threads in the thread pool.
|
java.util.concurrent.ThreadPoolExecutor |
getThreadPool()
Gets the thread pool for the algorithm to use.
|
void |
setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
Sets the thread pool for the algorithm to use.
|
clone, evaluate, getCostParameters, setCostParameters
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public ParallelClusterDistortionMeasure()
public ParallelClusterDistortionMeasure(ClusterDivergenceFunction<ClusterType,DataType> costParameters)
costParameters
- Divergence function that defines the cost functionpublic java.lang.Double evaluate(java.util.Collection<? extends ClusterType> target)
CostFunction
evaluate
in interface Evaluator<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,java.lang.Double>
evaluate
in interface CostFunction<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,ClusterDivergenceFunction<? super ClusterType extends Cluster<DataType>,? super DataType>>
evaluate
in class ClusterDistortionMeasure<DataType,ClusterType extends Cluster<DataType>>
target
- The object to evaluate.public java.util.concurrent.ThreadPoolExecutor getThreadPool()
ParallelAlgorithm
getThreadPool
in interface ParallelAlgorithm
public void setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
ParallelAlgorithm
setThreadPool
in interface ParallelAlgorithm
threadPool
- Thread pool used for parallelization.public int getNumThreads()
ParallelAlgorithm
getNumThreads
in interface ParallelAlgorithm