net.sourceforge.fuzzyservices.beans
Class Defuzzificator

java.lang.Object
  extended by net.sourceforge.fuzzyservices.beans.Defuzzificator
All Implemented Interfaces:
Serializable

public class Defuzzificator
extends Object
implements Serializable

This class represents a defuzzificator according to JavaBeans conventions.

Version:
1.0
Author:
Uwe Weng
See Also:
AbstractDefuzzificator, Serialized Form

Field Summary
static byte TYPE_CENTER_OF_AREA
          Constant that defines the center-of-area method as type.
static byte TYPE_LEFT_OF_MAX
          Constant that defines the left-of-max method as type.
static byte TYPE_MEAN_OF_MAX
          Constant that defines the mean-of-max method as type.
static String TYPE_PROPERTY
          Bound property name for type.
static byte TYPE_RIGHT_OF_MAX
          Constant that defines the right-of-max method as type.
 
Constructor Summary
Defuzzificator()
          Default Defuzzificator constructor.
Defuzzificator(byte newType)
          Constructs a new defuzzifcator.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 float defuzzify(FuzzySet fuzzySet)
          Defuzzifies the fuzzySet object using the specified type.
 byte getType()
          Returns the type of this defuzzificator.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void setType(byte newType)
          Sets the defuzzification type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_CENTER_OF_AREA

public static final byte TYPE_CENTER_OF_AREA
Constant that defines the center-of-area method as type.

See Also:
setType(byte), net.sourceforge.fuzzyservices.core.defuzzification.CenterOfArea, Constant Field Values

TYPE_LEFT_OF_MAX

public static final byte TYPE_LEFT_OF_MAX
Constant that defines the left-of-max method as type.

See Also:
setType(byte), net.sourceforge.fuzzyservices.core.defuzzification.LeftOfMax, Constant Field Values

TYPE_MEAN_OF_MAX

public static final byte TYPE_MEAN_OF_MAX
Constant that defines the mean-of-max method as type.

See Also:
setType(byte), net.sourceforge.fuzzyservices.core.defuzzification.MeanOfMax, Constant Field Values

TYPE_RIGHT_OF_MAX

public static final byte TYPE_RIGHT_OF_MAX
Constant that defines the right-of-max method as type.

See Also:
setType(byte), net.sourceforge.fuzzyservices.core.defuzzification.RightOfMax, Constant Field Values

TYPE_PROPERTY

public static final String TYPE_PROPERTY
Bound property name for type.

See Also:
Constant Field Values
Constructor Detail

Defuzzificator

public Defuzzificator()
Default Defuzzificator constructor.


Defuzzificator

public Defuzzificator(byte newType)
Constructs a new defuzzifcator.

Parameters:
newType - The new value for the property type.
Method Detail

getType

public final byte getType()
Returns the type of this defuzzificator.

Returns:
the type property
See Also:
setType(byte)

setType

public final void setType(byte newType)
Sets the defuzzification type.

Parameters:
newType - The new value for the property.
See Also:
getType()

defuzzify

public final float defuzzify(FuzzySet fuzzySet)
Defuzzifies the fuzzySet object using the specified type.

Parameters:
fuzzySet - The fuzzy set to be defuzzified
Returns:
The crisp value as result of the defuzzification
See Also:
setType(byte)

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property.

Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - the PropertyChangeListener to be removed


Copyright © 2007-2012 Fuzzy Services. All Rights Reserved.