Package libai.fuzzy.sets
Class TriangularShape
- java.lang.Object
-
- libai.fuzzy.sets.TriangularShape
-
- All Implemented Interfaces:
FuzzySet,XMLSerializer
public class TriangularShape extends java.lang.Object implements FuzzySet
Fuzzy set representing a triangular function. Only one point on the function can take the max value of 1. The triangular function can take 3 variations:
- right triangle to the left. a = b != c.
- centered triangle a != b != c.
- right triangle to the right a != b = c.
-
-
Constructor Summary
Constructors Constructor Description TriangularShape(double a, double b, double c)Constructor.TriangularShape(org.w3c.dom.Node xmlNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleeval(double x)Evaluate the membership of the set with the especified value.voidload(org.w3c.dom.Node xmlNode)Initializes the instance with the xml node information.java.lang.StringtoXMLString(java.lang.String indent)Returns the XML representation of this Fuzzy set according with the FML schema definition.
-
-
-
Method Detail
-
eval
public double eval(double x)
Description copied from interface:FuzzySetEvaluate the membership of the set with the especified value.
-
toXMLString
public java.lang.String toXMLString(java.lang.String indent)
Description copied from interface:XMLSerializerReturns the XML representation of this Fuzzy set according with the FML schema definition.- Specified by:
toXMLStringin interfaceXMLSerializer- Returns:
- XML representation of this Fuzzy Set.
-
load
public void load(org.w3c.dom.Node xmlNode)
Description copied from interface:XMLSerializerInitializes the instance with the xml node information.- Specified by:
loadin interfaceXMLSerializer- Parameters:
xmlNode- XML node with the information to load the current object with.
-
-