net.sourceforge.jFuzzyLogic.defuzzifier
Class DefuzzifierDiscrete

java.lang.Object
  extended by net.sourceforge.jFuzzyLogic.defuzzifier.Defuzzifier
      extended by net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierDiscrete
Direct Known Subclasses:
DefuzzifierCenterOfGravitySingletons

public abstract class DefuzzifierDiscrete
extends Defuzzifier

Generic discrete defuzzifier (a defuzzifier for continuous membership functions)

Author:
pcingola@users.sourceforge.net

Field Summary
(package private)  java.util.HashMap<java.lang.Double,java.lang.Double> discreteValues
          Funcion values: A generic discrete function x = [x_1, x_2, ....
 
Fields inherited from class net.sourceforge.jFuzzyLogic.defuzzifier.Defuzzifier
discrete
 
Constructor Summary
DefuzzifierDiscrete(Variable variable)
           
 
Method Summary
 org.jfree.chart.JFreeChart chart(java.lang.String title, boolean showIt)
          Create a defuzzifier's chart
abstract  double defuzzify()
          Deffuzification function
 double getDiscreteValue(double x)
          Get a point's 'y' value
 java.util.Iterator iterator()
          Get an iterator (on discreteValues' keys)
 void reset()
          Reset values
 void setPoint(double x, double y)
          Set a point
 int size()
          How many points are there in this defuzzifier
 
Methods inherited from class net.sourceforge.jFuzzyLogic.defuzzifier.Defuzzifier
getName, isDiscrete, setDiscrete, toString, toStringFCL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

discreteValues

java.util.HashMap<java.lang.Double,java.lang.Double> discreteValues
Funcion values: A generic discrete function x = [x_1, x_2, .... , x_n] y = [y_1, y_2, .... , y_n] y_i = f[x_i] Values are stored in 'discreteValues' hash

Constructor Detail

DefuzzifierDiscrete

public DefuzzifierDiscrete(Variable variable)
Method Detail

chart

public org.jfree.chart.JFreeChart chart(java.lang.String title,
                                        boolean showIt)
Create a defuzzifier's chart

Specified by:
chart in class Defuzzifier
Parameters:
title - : Title to show (if null => show membership function name)
showIt - : If true, plot is displayed

defuzzify

public abstract double defuzzify()
Deffuzification function

Specified by:
defuzzify in class Defuzzifier

getDiscreteValue

public double getDiscreteValue(double x)
Get a point's 'y' value


iterator

public java.util.Iterator iterator()
Get an iterator (on discreteValues' keys)


reset

public void reset()
Reset values

Specified by:
reset in class Defuzzifier

setPoint

public void setPoint(double x,
                     double y)
Set a point


size

public int size()
How many points are there in this defuzzifier