|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectclassifierLibrary.Classifier
Libary classifierLibrary, Class Classifier
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 Summary | |
Classifier(Rule r)
Constructor |
Method Summary | |
double |
callFunction(java.lang.String which)
Calls a functional method of the classifier specified by its name (no further parameters). |
java.lang.Object |
clone()
|
boolean |
compatibility(Classifier cl)
Checks compatibility of instance to another instance. |
double |
conditionMatchSubsumptive(Situation sit)
Computes relative degree of a classifiers condition matching a given situation. |
Classifier |
cross(Classifier cl)
Returns Classifier as a result of crossing with another classifier, crossing at random position. |
Classifier |
cross(Classifier cl,
int position)
Returns Classifier that is a result of crossing with another given classifier, crossing at defined position. |
void |
debug_out()
Method for debugging-purposes. |
long |
getID()
Returns running number of classifier-object for debugging purposes. |
Rule |
getRule()
Returns the rule part of the classifier. |
Classifier |
mutation(double probability)
Returns mutation of the current classifier. |
void |
setRule(Rule r)
Sets rule-part of the classifier to the given rule. |
double |
size()
Returns size of the classifiers rule, if situations are defined as sets should be size of the sets. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Classifier(Rule r)
r
- rule, becoming part of the classifier.Method Detail |
public java.lang.Object clone()
public Rule getRule()
public void setRule(Rule r)
r
- rule to be set for the classifierpublic double conditionMatchSubsumptive(Situation sit)
sit
- situation for comparison
public boolean compatibility(Classifier cl)
cl
- Classifier against which compatibility is to be checked.
public void debug_out()
public Classifier cross(Classifier cl, int position)
cl
- Classifier to cross withposition
- position for crossover
public Classifier cross(Classifier cl)
Returns Classifier as a result of crossing with another classifier, crossing at random position.
cl
- Classifier tp cross with
public Classifier mutation(double probability)
Returns mutation of the current classifier. Mutation of elements with given probability.
probability
- probability of mutation
public long getID()
Returns running number of classifier-object for debugging purposes.
public double size()
Returns size of the classifiers rule, if situations are defined as sets should be size of the sets.
public double callFunction(java.lang.String which)
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.
which
- name of function
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |