|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.fuzzyservices.beans.MembershipFunction
public class MembershipFunction
The membership function f(x) is defined by a setDegreeOfMembership of points. Every point marks a relationship between a value x and its degree of membership. All points clamp a traverse. If the degree of membership of a value is not defined by a point exactly it will be calculated by interpolation. This class offers methods for manipulating the membership function, in general. For calculation the pointed membership function is iterated in a certain increment defined in fuzzy manager of this system.
MembershipFunctionPoint,
FuzzySet,
FuzzyNumber,
FuzzyLRNumber,
FuzzyInterval,
FuzzyLRInterval,
Serialized Form| Field Summary | |
|---|---|
static String |
DEGREE_OF_MEMBERSHIP_PROPERTY
Bound property name for newDegreeOfMembership. |
| Constructor Summary | |
|---|---|
MembershipFunction()
Creates a membership function with f(x) = 0. |
|
MembershipFunction(float x,
float spread)
Creates a membership function looks like an isosceles triangle. |
|
MembershipFunction(float plateau1,
float plateau2,
float alpha,
float beta)
Creates a membership function looks like a trapezium. |
|
MembershipFunction(MembershipFunctionPoint[] newPoints)
Creates a membership function with already existing points. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener to the listener list. |
void |
clear()
Reset the membership function to f(x) = 0.0. |
Object |
clone()
|
void |
concentrate()
Concentrates the membership function. |
void |
dilate()
Dilates the membership function. |
boolean |
equals(Object obj)
|
float |
getAlpha()
Returns the spread on the left falling edge. |
float |
getBeta()
Returns the spread on the right falling edge. |
float |
getDegreeOfMembership(float x)
Returns the degree of membership to a x value. |
float |
getGranularity(MembershipFunction membershipFunction)
Calculates the increment when combining this membership function with membershipFunction. |
float |
getHeight()
Returns the height of the membership function. |
int |
getId()
Returns the technical identifier (e.g. within a database). |
float |
getMaxDefinedX()
Gets the maximal value which is defined on the x axis by the set of points. |
float |
getMinDefinedX()
Gets the minimal value which is defined on the x axis by the set of points. |
int |
getNumSteps(MembershipFunction membershipFunction)
Calculates the number of steps when combining this membership function with membershipFunction. |
float[] |
getXValues()
Returns an array of all x values which define the membership function. |
int |
hashCode()
|
void |
invert()
Creates the inverse of the membership function. |
boolean |
isConvex()
Checks whether the membership function is convex. |
boolean |
isDefined()
Checks if the membership function is defined by at least one point. |
boolean |
isNormalized()
Checks whether the membership function is normalized. |
Iterator<Float> |
iterator()
Returns an iterator of all x values which define the membership function. |
void |
negate()
Negates the membership function. |
void |
normalize()
Normalizes the membership function. |
void |
reciproce()
Creates the complementary membership function (f(x) = 1-f(x)). |
void |
reduce()
Reduces the number of points without changing the appearance of the membership function. |
void |
remove(float x)
Sets the degree of membership at x to 0.0. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list. |
void |
setDegreeOfMembership(float x,
float newDegreeOfMembership)
Defines at x a new degree of membership. |
int |
size()
Returns the number of points specifying the membership function. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEGREE_OF_MEMBERSHIP_PROPERTY
newDegreeOfMembership.
| Constructor Detail |
|---|
public MembershipFunction()
public MembershipFunction(MembershipFunctionPoint[] newPoints)
newPoints - an array of X/Degree of Membership Pairs.
public MembershipFunction(float x,
float spread)
x - the x value with degree of membership of 1.0spread - the spread to x x with degree of membership 0.0
public MembershipFunction(float plateau1,
float plateau2,
float alpha,
float beta)
plateau1 and plateau2 is 1.0.
plateau1 - coming from left at this point the membership is 1.0 the first time.plateau2 - coming from right at this point the membership is 1.0 the first time.alpha - the spread of the left trailing edgebeta - the spread of the right trailing edge| Method Detail |
|---|
public int getId()
public final void setDegreeOfMembership(float x,
float newDegreeOfMembership)
throws PropertyVetoException
x a new degree of membership.
x - the x coordinatenewDegreeOfMembership - the new degree of membership at x
PropertyVetoException - when the attempt to set the property is
vetoed by a listener
public final void remove(float x)
throws PropertyVetoException
x to 0.0.
x - the x coordinate
PropertyVetoException - when the attempt to set the property is
vetoed by a listener
public final void clear()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerpublic final float getAlpha()
public final float getBeta()
public final float getHeight()
public final boolean isNormalized()
true if membership function is normalized
false, otherwisegetHeight()
public final void normalize()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerisNormalized()
public final void reciproce()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listener
public final void dilate()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listener
public final void concentrate()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerpublic final boolean isConvex()
true if membership function is convex
false, otherwisepublic final Iterator<Float> iterator()
public final float[] getXValues()
public final int size()
public final boolean isDefined()
true if a point exists false, otherwisepublic final float getDegreeOfMembership(float x)
x - the x value
xpublic int getNumSteps(MembershipFunction membershipFunction)
membershipFunction.
membershipFunction - the membership function for combining
public float getGranularity(MembershipFunction membershipFunction)
membershipFunction.
membershipFunction - the membershipFunction for combining
public void reduce()
public final float getMinDefinedX()
public final float getMaxDefinedX()
public final void negate()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerFuzzyNumber,
FuzzyLRNumber,
FuzzyInterval,
FuzzyLRInterval
public final void invert()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerFuzzyNumber,
FuzzyLRNumber,
FuzzyInterval,
FuzzyLRIntervalpublic final void addVetoableChangeListener(VetoableChangeListener listener)
VetoableChangeListener to the listener list. The
listener is registered for all properties.
listener - the VetoableChangeListener to be addedpublic final void removeVetoableChangeListener(VetoableChangeListener listener)
VetoableChangeListener from the listener list.
This removes a VetoableChangeListener that was registered
for all properties.
listener - the VetoableChangeListener to be removedpublic final void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list. The
listener is registered for all properties.
A PropertyChangeEvent will get fired in response to setting
a bound property.
listener - the PropertyChangeListener to be addedpublic final void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
listener - the PropertyChangeListener to be removedpublic Object clone()
clone in class Objectpublic final boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||