Package libai.fuzzy

Class FuzzyController

  • All Implemented Interfaces:
    XMLSerializer

    public class FuzzyController
    extends java.lang.Object
    implements XMLSerializer
    Created by kronenthaler on 30/04/2017.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,java.lang.Double> fire​(java.util.Map<java.lang.String,java.lang.Double> variables, double delta)
      Fires the rule's antecedents, with the given variable values.
      java.lang.String getIpAddress()  
      java.lang.String getName()  
      void load​(org.w3c.dom.Node xmlNode)
      Initializes the instance with the xml node information.
      static FuzzyController open​(java.io.File file)  
      static FuzzyController open​(java.io.InputStream inputStream)  
      static FuzzyController open​(java.lang.String path)  
      boolean save​(java.lang.String path)  
      java.lang.String toXMLString​(java.lang.String indent)
      Returns the XML representation of this Fuzzy set according with the FML schema definition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FuzzyController

        public FuzzyController​(org.w3c.dom.Node xmlNode)
      • FuzzyController

        public FuzzyController​(java.lang.String name,
                               java.lang.String ip,
                               KnowledgeBase kb,
                               RuleBase rb)
    • 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 interface XMLSerializer
        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 interface XMLSerializer
        Parameters:
        xmlNode - XML node with the information to load the current object with.
      • fire

        public java.util.Map<java.lang.String,java.lang.Double> fire​(java.util.Map<java.lang.String,java.lang.Double> variables,
                                                                     double delta)
        Fires the rule's antecedents, with the given variable values.
        Parameters:
        variables - Map containing the variable name and its current value at the moment the rules are going to be evaluated.
        Returns:
        A map with all output variables activated and their corresponding value.
      • getName

        public java.lang.String getName()
      • getIpAddress

        public java.lang.String getIpAddress()
      • open

        public static final FuzzyController open​(java.lang.String path)
                                          throws java.io.IOException,
                                                 javax.xml.parsers.ParserConfigurationException,
                                                 org.xml.sax.SAXException
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
      • open

        public static final FuzzyController open​(java.io.File file)
                                          throws java.io.IOException,
                                                 javax.xml.parsers.ParserConfigurationException,
                                                 org.xml.sax.SAXException
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
      • open

        public static final FuzzyController open​(java.io.InputStream inputStream)
                                          throws java.io.IOException,
                                                 javax.xml.parsers.ParserConfigurationException,
                                                 org.xml.sax.SAXException
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
      • save

        public boolean save​(java.lang.String path)