nrc.fuzzy
Class LarsenProductMaxMinRuleExecutor

java.lang.Object
  |
  +--nrc.fuzzy.FuzzyRuleExecutor
        |
        +--nrc.fuzzy.LarsenProductMaxMinRuleExecutor
All Implemented Interfaces:
java.lang.Cloneable, FuzzyRuleExecutorInterface, java.io.Serializable

public class LarsenProductMaxMinRuleExecutor
extends FuzzyRuleExecutor
implements java.io.Serializable

Implements the FuzzyRuleExecutor interface providing an execute method that accepts a FuzzyRule object and returns a FuzzyValueVector composed of the actual conclusion FuzzyValues for the rule using the Larsen Product inference operator and MaxMin composition. This method has the rather nice property that the outputs are generated from the conclusions by 'scaling' them by a value (DOF -- Degree of Fullment of the rule) that is calculated as the minimum (or product etc. depending on current AntecedentCombineOperator) of the maximum membership values of the intersections of the fuzzy value antecedent and input pairs. So one can calculate the intersections of the pairs, get the maximum membership value for each intersection and find the minimum of these. Should the rule be fired a second time and the antecedents and inputs have not changed, it is only necessary to clip the consequents, avoiding some expensive calculations. NOTE: In order to do this optimization it is required the the executor NOT be shared amongst rules. In effect each rule must have its own unique instance of the executor. This is enforced in Rule creation, since each RuleExecutor must implement the cloneable interface and provide a clone method.

See Also:
MamdaniMinMaxMinRuleExecutor, TsukamotoExecutor, FuzzyRuleExecutor, AntecedentCombineOperator, MinimumAntecedentCombineOperator, ProductAntecedentCombineOperator, Serialized Form

Constructor Summary
LarsenProductMaxMinRuleExecutor()
           
 
Method Summary
 java.lang.Object clone()
          Implements the required cloning of a RuleExecutor.
 nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyRule rule)
          This execute method implements rule execution using the Larsen Product inference operator and Max-Min composition.
 nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyValueVector antecedents, nrc.fuzzy.FuzzyValueVector conclusions, nrc.fuzzy.FuzzyValueVector inputs)
          This execute method implements rule execution using the Larsen Product inference operator and Max-Min composition.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LarsenProductMaxMinRuleExecutor

public LarsenProductMaxMinRuleExecutor()
Method Detail

clone

public java.lang.Object clone()
Implements the required cloning of a RuleExecutor.

Overrides:
clone in class java.lang.Object
Returns:
the newly cloned RuleExecutor

execute

public nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyRule rule)
                                   throws IncompatibleRuleInputsException
This execute method implements rule execution using the Larsen Product inference operator and Max-Min composition. Classes that implement the FuzzyRuleExecutor interface must provide an execute method that accepts a FuzzyRule object and returns a FuzzyValueVector composed of the actual output FuzzyValues for the rule.

Specified by:
execute in interface FuzzyRuleExecutorInterface
Parameters:
rule - the rule that is to be executed (fired)
Returns:
A FuzzyValueVector with the FuzzyValues that represent the outputs of the fired rule.
Throws:
IncompatibleRuleInputsException

execute

public nrc.fuzzy.FuzzyValueVector execute(nrc.fuzzy.FuzzyValueVector antecedents,
                                          nrc.fuzzy.FuzzyValueVector conclusions,
                                          nrc.fuzzy.FuzzyValueVector inputs)
                                   throws IncompatibleRuleInputsException
This execute method implements rule execution using the Larsen Product inference operator and Max-Min composition. Classes that implement the FuzzyRuleExecutor interface must provide an execute method that accepts 3 FuzzyValueVector objects and returns a FuzzyValueVector composed of the actual output FuzzyValues for the rule.

Specified by:
execute in interface FuzzyRuleExecutorInterface
Parameters:
antecedents - The FuzzyValues that represent a rule's antecedents.
conclusions - The FuzzyValues that represent a rule's conclusions.
inputs - The FuzzyValues that represent a rule's inputs.
Returns:
A FuzzyValueVector with the FuzzyValues that represent the outputs of the fired rule.
Throws:
IncompatibleRuleInputsException