Package libai.fuzzy
Class FuzzyVariable
- java.lang.Object
-
- libai.fuzzy.FuzzyVariable
-
- All Implemented Interfaces:
XMLSerializer
public class FuzzyVariable extends java.lang.Object implements XMLSerializer
Created by kronenthaler on 23/04/2017.
-
-
Field Summary
Fields Modifier and Type Field Description protected Accumulation
accumulation
protected double
defaultValue
protected Defuzzifier
defuzzifier
protected double
domainLeft
protected double
domainRight
protected java.lang.String
name
protected java.lang.String
scale
protected java.util.List<FuzzyTerm>
terms
protected libai.fuzzy.FuzzyVariable.Type
type
-
Constructor Summary
Constructors Constructor Description FuzzyVariable(java.lang.String name, double domainLeft, double domainRight, double defaultValue, java.lang.String scale, Accumulation accumulation, Defuzzifier defuzzifier, FuzzyTerm... terms)
FuzzyVariable(java.lang.String name, double domainLeft, double domainRight, java.lang.String scale, FuzzyTerm... terms)
FuzzyVariable(org.w3c.dom.Node xmlNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
defuzzify(ActivationMethod activationMethod, KnowledgeBase knowledgeBase, double delta, java.util.List<Pair<java.lang.Double,Clause>> terms)
FuzzyTerm
getTerm(java.lang.String name)
void
load(org.w3c.dom.Node xmlNode)
Initializes the instance with the xml node information.java.lang.String
toXMLString(java.lang.String indent)
Returns the XML representation of this Fuzzy set according with the FML schema definition.
-
-
-
Field Detail
-
terms
protected java.util.List<FuzzyTerm> terms
-
name
protected java.lang.String name
-
domainLeft
protected double domainLeft
-
domainRight
protected double domainRight
-
scale
protected java.lang.String scale
-
type
protected libai.fuzzy.FuzzyVariable.Type type
-
defaultValue
protected double defaultValue
-
accumulation
protected Accumulation accumulation
-
defuzzifier
protected Defuzzifier defuzzifier
-
-
Constructor Detail
-
FuzzyVariable
public FuzzyVariable(org.w3c.dom.Node xmlNode)
-
FuzzyVariable
public FuzzyVariable(java.lang.String name, double domainLeft, double domainRight, java.lang.String scale, FuzzyTerm... terms)
-
FuzzyVariable
public FuzzyVariable(java.lang.String name, double domainLeft, double domainRight, double defaultValue, java.lang.String scale, Accumulation accumulation, Defuzzifier defuzzifier, FuzzyTerm... terms)
-
-
Method Detail
-
toXMLString
public java.lang.String toXMLString(java.lang.String indent)
Description copied from interface:XMLSerializer
Returns the XML representation of this Fuzzy set according with the FML schema definition.- Specified by:
toXMLString
in interfaceXMLSerializer
- Returns:
- XML representation of this Fuzzy Set.
-
load
public void load(org.w3c.dom.Node xmlNode)
Description copied from interface:XMLSerializer
Initializes the instance with the xml node information.- Specified by:
load
in interfaceXMLSerializer
- Parameters:
xmlNode
- XML node with the information to load the current object with.
-
getTerm
public FuzzyTerm getTerm(java.lang.String name)
-
defuzzify
public double defuzzify(ActivationMethod activationMethod, KnowledgeBase knowledgeBase, double delta, java.util.List<Pair<java.lang.Double,Clause>> terms)
-
-