public class StandardClassifier extends Classifier
Library classifierLibrary, Klasse StandardClassifier
Copyright by Klaus Hufschlag 2004,2005,2006
This file is part of the Generic Classifier Library. The Generic Classifier Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Generic Classifier Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the Generic Classifier Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Constructor and Description |
---|
StandardClassifier(Rule r,
double strength)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
callFunction(java.lang.String which)
Calls a functional method of the classifier specified by its name (no
further parameters).
|
StandardClassifier |
cross(StandardClassifier c,
int Position)
Crossover-Method, extending the inherited crossover-method, setting the
strenght value of the resulting classifier to the average of the previous
ones.
|
double |
getStrength()
Returns the classifier's strength-attribute
|
void |
setStrength(double value)
Sets the classifier's strength-attribute
|
clone, compatibility, conditionMatchSubsumptive, cross, cross, debug_out, getID, getRule, mutation, setRule, size
public StandardClassifier(Rule r, double strength)
r
- Rule for the Classifierstrength
- Value for strengthpublic void setStrength(double value)
value
- Value for strength to be setpublic double getStrength()
public StandardClassifier cross(StandardClassifier c, int Position)
c
- StandardClassifier to cross withPosition
- Position for crossoverClassifier.cross(classifierLibrary.Classifier,int)
public double callFunction(java.lang.String which)
Classifier
Calls a functional method of the classifier specified by its name (no further parameters). Enables calling sub-class-specific functions even when using objects declared with generic classes.
callFunction
in class Classifier
which
- name of function