net.sourceforge.jFuzzyLogic.membership
Class MembershipFunctionSingleton

java.lang.Object
  extended by net.sourceforge.jFuzzyLogic.membership.MembershipFunction
      extended by net.sourceforge.jFuzzyLogic.membership.MembershipFunctionDiscrete
          extended by net.sourceforge.jFuzzyLogic.membership.MembershipFunctionSingleton

public class MembershipFunctionSingleton
extends MembershipFunctionDiscrete

Singleton membership function

Author:
pcingola@users.sourceforge.net

Field Summary
 
Fields inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunction
discrete, parameters, universeMax, universeMin
 
Constructor Summary
MembershipFunctionSingleton(double valueX, double valueY)
          Constructor for a simple (only one value) singleton
 
Method Summary
 boolean checkParamters(java.lang.StringBuffer errors)
           
 void estimateUniverse()
          Try to guess the universe (if not setted)
 java.util.Iterator<java.lang.Double> iterator()
          Create an iterator for every discrete value (x values)
 double membership(double in)
          Get membership function's value.
 double membership(int index)
          Memebership function for point number 'index'
 int size()
          Number of points in this function
 java.lang.String toString()
           
 java.lang.String toStringFCL()
          FCL representation
 double valueX(int index)
          Value 'x' for point number 'index'
 
Methods inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunctionDiscrete
chart
 
Methods inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunction
getName, getParameter, getParametersLength, getUniverseMax, getUniverseMin, isDiscrete, setDiscrete, setParameter, setUniverseMax, setUniverseMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MembershipFunctionSingleton

public MembershipFunctionSingleton(double valueX,
                                   double valueY)
Constructor for a simple (only one value) singleton

Parameters:
valueX -
valueY -
Method Detail

checkParamters

public boolean checkParamters(java.lang.StringBuffer errors)
Specified by:
checkParamters in class MembershipFunction

estimateUniverse

public void estimateUniverse()
Description copied from class: MembershipFunction
Try to guess the universe (if not setted)

Specified by:
estimateUniverse in class MembershipFunction

iterator

public java.util.Iterator<java.lang.Double> iterator()
Description copied from class: MembershipFunctionDiscrete
Create an iterator for every discrete value (x values)

Specified by:
iterator in class MembershipFunctionDiscrete
Returns:
An iterator
See Also:
MembershipFunctionDiscrete.iterator()

membership

public double membership(double in)
Description copied from class: MembershipFunction
Get membership function's value.

Specified by:
membership in class MembershipFunction
Parameters:
in - : Variable's 'x' value Note: Output mu be in range [0,1]
See Also:
MembershipFunction.membership(double)

membership

public double membership(int index)
Description copied from class: MembershipFunctionDiscrete
Memebership function for point number 'index'

Specified by:
membership in class MembershipFunctionDiscrete
See Also:
MembershipFunctionDiscrete.membership(int)

size

public int size()
Description copied from class: MembershipFunctionDiscrete
Number of points in this function

Specified by:
size in class MembershipFunctionDiscrete

toString

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

valueX

public double valueX(int index)
Description copied from class: MembershipFunctionDiscrete
Value 'x' for point number 'index'

Specified by:
valueX in class MembershipFunctionDiscrete

toStringFCL

public java.lang.String toStringFCL()
FCL representation

Specified by:
toStringFCL in class MembershipFunction