classifierLibrary
Class StandardClassifier

java.lang.Object
  extended byclassifierLibrary.Classifier
      extended byclassifierLibrary.StandardClassifier
All Implemented Interfaces:
java.lang.Cloneable

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.

Version:
1.4
Author:
Klaus Hufschlag

Constructor Summary
StandardClassifier(Rule r, double strength)
          Constructor
 
Method Summary
 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
 
Methods inherited from class classifierLibrary.Classifier
clone, compatibility, conditionMatchSubsumptive, cross, cross, debug_out, getID, getRule, mutation, setRule, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardClassifier

public StandardClassifier(Rule r,
                          double strength)
Constructor

Parameters:
r - Rule for the Classifier
strength - Value for strength
Method Detail

setStrength

public void setStrength(double value)
Sets the classifier's strength-attribute

Parameters:
value - Value for strength to be set

getStrength

public double getStrength()
Returns the classifier's strength-attribute

Returns:
Strength value as double

cross

public 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.

Parameters:
c - StandardClassifier to cross with
Position - Position for crossover
Returns:
new StandardClassifier as result of crossover
See Also:
Classifier.cross(classifierLibrary.Classifier,int)

callFunction

public double callFunction(java.lang.String which)
Description copied from class: 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.

Overrides:
callFunction in class Classifier
Parameters:
which - name of function
Returns:
return value of function (numeric only)