C# Class UnityAI.Core.Fuzzy.FuzzyRuleBase

Exibir arquivo Open project: unityai/unityai-core Class Usage Examples

Public Methods

Method Description
AddConditionalRule ( FuzzyRule rule ) : void

Add a Conditional Rule

AddUnconditionalRule ( FuzzyRule rule ) : void

Add an Unconditional Rule

AddVariable ( FuzzyRuleVariable variable ) : void

Add the Variable

Clear ( ) : void

Clear the RuleBase

CreateClause ( ContinuousFuzzyRuleVariable lhs, EnumFuzzyOperator oper, string hedges, string setName ) : FuzzyClause

Crate the Clause

ForwardChain ( ) : void

Forward Chain through the Fuzzy Rulebase Rules are Reset Uncoditional Rules are Fired Conditional Rules are Fired

FuzzyRuleBase ( string vsName ) : System

Creaes a Fuzzy Rule Base

GetVariable ( string name ) : FuzzyRuleVariable

Get the Variable based on the Name

Reset ( ) : void

Reset the Variables

Private Methods

Method Description
BitArrayEquality ( System b1, System b2 ) : bool

Check if BitArrays are Equal

GetFuzzySet ( ContinuousFuzzyRuleVariable lhs, string setName, string hedges ) : FuzzySet

Get the FuzzySet based on the hedges

ProcessAssertionRules ( System factBase ) : void

Processes the Assertion Rules

ProcessConditionalRules ( System factBase ) : void

Fires the rule (if-then)

Method Details

AddConditionalRule() public method

Add a Conditional Rule
public AddConditionalRule ( FuzzyRule rule ) : void
rule FuzzyRule The Rule
return void

AddUnconditionalRule() public method

Add an Unconditional Rule
public AddUnconditionalRule ( FuzzyRule rule ) : void
rule FuzzyRule The Rule
return void

AddVariable() public method

Add the Variable
public AddVariable ( FuzzyRuleVariable variable ) : void
variable FuzzyRuleVariable The Variable
return void

Clear() public method

Clear the RuleBase
public Clear ( ) : void
return void

CreateClause() public method

Crate the Clause
public CreateClause ( ContinuousFuzzyRuleVariable lhs, EnumFuzzyOperator oper, string hedges, string setName ) : FuzzyClause
lhs ContinuousFuzzyRuleVariable Left Hand Side
oper EnumFuzzyOperator Operator
hedges string Hedges
setName string Set Name
return FuzzyClause

ForwardChain() public method

Forward Chain through the Fuzzy Rulebase Rules are Reset Uncoditional Rules are Fired Conditional Rules are Fired
public ForwardChain ( ) : void
return void

FuzzyRuleBase() public method

Creaes a Fuzzy Rule Base
public FuzzyRuleBase ( string vsName ) : System
vsName string Name of the Rule Base
return System

GetVariable() public method

Get the Variable based on the Name
public GetVariable ( string name ) : FuzzyRuleVariable
name string Name of Variable
return FuzzyRuleVariable

Reset() public method

Reset the Variables
public Reset ( ) : void
return void