ObjectParameter<FilteredLocalPCABasedDistanceFunction<V, ?, D>> pdistP = new ObjectParameter<FilteredLocalPCABasedDistanceFunction<V, ?, D>>(PARTITION_DISTANCE_ID, FilteredLocalPCABasedDistanceFunction.class, LocallyWeightedDistanceFunction.class);
if(config.grab(pdistP)) {
ListParameterization predefinedDist = new ListParameterization();
predefinedDist.addParameter(IndexBasedDistanceFunction.INDEX_ID, indexI);
ChainedParameterization chainDist = new ChainedParameterization(predefinedDist, config);
chainDist.errorsTo(config);
pdistI = pdistP.instantiateClass(chainDist);
predefinedDist.reportInternalParameterizationErrors(config);
}
// Parameterize algorithm:
ClassParameter<ClusteringAlgorithm<Clustering<Model>>> algP = new ClassParameter<ClusteringAlgorithm<Clustering<Model>>>(PARTITION_ALGORITHM_ID, ClusteringAlgorithm.class);
if(config.grab(algP)) {
ListParameterization predefined = new ListParameterization();
predefined.addParameter(AbstractDistanceBasedAlgorithm.DISTANCE_FUNCTION_ID, pdistI);
TrackParameters trackpar = new TrackParameters(config);
ChainedParameterization chain = new ChainedParameterization(predefined, trackpar);
chain.errorsTo(config);
algP.instantiateClass(chain);
algC = algP.getValue();
algO = trackpar.getGivenParameters();
predefined.reportInternalParameterizationErrors(chain);
}