net.sourceforge.jFuzzyLogic
Class FIS

java.lang.Object
  extended by net.sourceforge.jFuzzyLogic.FIS

public class FIS
extends java.lang.Object

Fuzzy inference system A complete inference system contains: - input variables - output variables - fuzzifiers - defuzzifiers - rules

Author:
pcingola@users.sourceforge.net

Field Summary
(package private)  java.util.HashMap<java.lang.String,FuzzyRuleSet> ruleSets
          Several ruleSets indexed by name - Each 'RuleSet' contains 'Variables' and 'FuzzyRules'.
 
Constructor Summary
FIS()
          Default constructor
 
Method Summary
 FIS addFuzzyRuleSet(java.lang.String ruleSetName, FuzzyRuleSet ruleSet)
          Add a new ruleset
private static FIS createFromLexer(FCLLexer lexer, boolean verbose)
          Create a "Fuzzy inference system (FIS)" from an FCL definition string
static FIS createFromString(java.lang.String fclDefinition, boolean verbose)
          Create a "Fuzzy inference system (FIS)" from an FCL definition string
 FuzzyRuleSet getFuzzyRuleSet()
          Get a fuzzy rule set (first I can find, if there are more that one)
 FuzzyRuleSet getFuzzyRuleSet(java.lang.String ruleSetName)
          Get a fuzzy rule set
static FIS load(java.lang.String fileName)
          Load an FCL file and create a "Fuzzy inference system (FIS)"
static FIS load(java.lang.String fileName, boolean verbose)
          Load an FCL file and create a "Fuzzy inference system (FIS)"
 java.lang.String toString()
           
private  java.lang.String toString(boolean useFCL)
           
 java.lang.String toStringFCL()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ruleSets

java.util.HashMap<java.lang.String,FuzzyRuleSet> ruleSets
Several ruleSets indexed by name - Each 'RuleSet' contains 'Variables' and 'FuzzyRules'. - 'Varibles' contain 'Deffuzyfiers' ans 'LinguisticTerms' - 'LinguisticTerms' contain 'MembershipFunctions'

Constructor Detail

FIS

public FIS()
Default constructor

Method Detail

createFromLexer

private static FIS createFromLexer(FCLLexer lexer,
                                   boolean verbose)
Create a "Fuzzy inference system (FIS)" from an FCL definition string

Parameters:
lexer - : lexer to use
verbose - : be verbose?
Returns:
A new FIS (or null on error)

createFromString

public static FIS createFromString(java.lang.String fclDefinition,
                                   boolean verbose)
Create a "Fuzzy inference system (FIS)" from an FCL definition string

Parameters:
fclDefinition - : FCL definition
verbose - : Be verbose?
Returns:
A new FIS or null on error

load

public static FIS load(java.lang.String fileName)
Load an FCL file and create a "Fuzzy inference system (FIS)"

Parameters:
fileName - : FCL file name
Returns:
A new FIS or null on error

load

public static FIS load(java.lang.String fileName,
                       boolean verbose)
Load an FCL file and create a "Fuzzy inference system (FIS)"

Parameters:
fileName - : FCL file name
verbose - : Be verbose?
Returns:
A new FIS or null on error

addFuzzyRuleSet

public FIS addFuzzyRuleSet(java.lang.String ruleSetName,
                           FuzzyRuleSet ruleSet)
Add a new ruleset

Parameters:
ruleSetName - : Fuzzy rule set name
ruleSet - : Fuzzy rule set
Returns:
this

getFuzzyRuleSet

public FuzzyRuleSet getFuzzyRuleSet()
Get a fuzzy rule set (first I can find, if there are more that one)

Returns:
Fuzzy rule set (or null if not found)

getFuzzyRuleSet

public FuzzyRuleSet getFuzzyRuleSet(java.lang.String ruleSetName)
Get a fuzzy rule set

Parameters:
ruleSetName - : Fuzzy rule set's name
Returns:
Fuzzy rule set (or null if not found)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

private java.lang.String toString(boolean useFCL)

toStringFCL

public java.lang.String toStringFCL()