net.sourceforge.jFuzzyLogic.membership
Class MembershipFunction

java.lang.Object
  extended by net.sourceforge.jFuzzyLogic.membership.MembershipFunction
Direct Known Subclasses:
MembershipFunctionContinuous, MembershipFunctionDiscrete

public abstract class MembershipFunction
extends java.lang.Object

Base membership function

Author:
pcingola@users.sourceforge.net

Field Summary
(package private)  boolean discrete
           
(package private)  double[] parameters
          Function's parameters
(package private)  double universeMax
          Universe max (range max)
(package private)  double universeMin
          Universe min (range min)
 
Constructor Summary
MembershipFunction()
          Constructor
 
Method Summary
abstract  org.jfree.chart.JFreeChart chart(java.lang.String title, boolean showIt)
          Create a membership function chart
abstract  boolean checkParamters(java.lang.StringBuffer errors)
           
abstract  void estimateUniverse()
          Try to guess the universe (if not setted)
 java.lang.String getName()
          Short name
 double getParameter(int i)
           
 int getParametersLength()
           
 double getUniverseMax()
           
 double getUniverseMin()
           
 boolean isDiscrete()
           
abstract  double membership(double in)
          Get membership function's value.
 void setDiscrete(boolean discrete)
           
 void setParameter(int i, double value)
           
 void setUniverseMax(double universeMax)
           
 void setUniverseMin(double universeMin)
           
 java.lang.String toString()
           
abstract  java.lang.String toStringFCL()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

discrete

boolean discrete

parameters

double[] parameters
Function's parameters


universeMax

double universeMax
Universe max (range max)


universeMin

double universeMin
Universe min (range min)

Constructor Detail

MembershipFunction

MembershipFunction()
Constructor

Method Detail

chart

public abstract org.jfree.chart.JFreeChart chart(java.lang.String title,
                                                 boolean showIt)
Create a membership function chart

Parameters:
title - : Title to show (if null => show membership function name)
showIt - : If true, plot is displayed

checkParamters

public abstract boolean checkParamters(java.lang.StringBuffer errors)

estimateUniverse

public abstract void estimateUniverse()
Try to guess the universe (if not setted)


getName

public java.lang.String getName()
Short name


getParameter

public double getParameter(int i)

getParametersLength

public int getParametersLength()

getUniverseMax

public double getUniverseMax()

getUniverseMin

public double getUniverseMin()

isDiscrete

public boolean isDiscrete()

membership

public abstract double membership(double in)
Get membership function's value.

Parameters:
in - : Variable's 'x' value Note: Output mu be in range [0,1]

setDiscrete

public void setDiscrete(boolean discrete)

setParameter

public void setParameter(int i,
                         double value)

setUniverseMax

public void setUniverseMax(double universeMax)

setUniverseMin

public void setUniverseMin(double universeMin)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringFCL

public abstract java.lang.String toStringFCL()