ObjectParameter<DistanceFunction<? super O, D>> distP = AbstractAlgorithm.makeParameterDistanceFunction(EuclideanDistanceFunction.class, DistanceFunction.class);
if(config.grab(distP)) {
distf = distP.instantiateClass(config);
}
// k parameters
IntParameter stepkP = new IntParameter(STEPK_ID, new GreaterConstraint(0));
if(config.grab(stepkP)) {
stepk = stepkP.getValue();
}
IntParameter startkP = new IntParameter(STARTK_ID, true);
if(config.grab(startkP)) {
startk = startkP.getValue();
}
else {
startk = stepk;
}
IntParameter maxkP = new IntParameter(MAXK_ID, new GreaterConstraint(0));
if(config.grab(maxkP)) {
maxk = maxkP.getValue();
}
bylabel = config.tryInstantiate(ByLabelOutlier.class);
// Output