The RuleBlock class contains a set of Rules and fuzzy logic operators required to control an Engine. More...
#include <RuleBlock.h>
Public Member Functions | |
| RuleBlock (const std::string &name="") | |
| RuleBlock (const RuleBlock &other) | |
| RuleBlock & | operator= (const RuleBlock &other) |
| virtual | ~RuleBlock () |
| virtual void | setEnabled (bool enabled) |
| Enables the rule block. More... | |
| virtual bool | isEnabled () const |
| Indicates whether the rule block is enabled. More... | |
| virtual void | activate () |
| Activates the rule block. More... | |
| virtual void | setName (std::string name) |
| Sets the name of the rule block. More... | |
| virtual std::string | getName () const |
| Gets the name of the rule block. More... | |
| virtual std::string | getDescription () const |
| Gets the description of the rule block. More... | |
| virtual void | setDescription (const std::string &description) |
| Sets the description of the rule block. More... | |
| virtual void | setConjunction (TNorm *conjunction) |
| Sets the conjunction operator. More... | |
| virtual TNorm * | getConjunction () const |
| Gets the conjunction operator. More... | |
| virtual void | setDisjunction (SNorm *disjunction) |
| Sets the disjunction operator. More... | |
| virtual SNorm * | getDisjunction () const |
| Gets the disjunction operator. More... | |
| virtual void | setImplication (TNorm *implication) |
| Sets the implication operator. More... | |
| virtual TNorm * | getImplication () const |
| Gets the implication operator. More... | |
| virtual void | setActivation (Activation *activation) |
| Sets the activation method. More... | |
| virtual Activation * | getActivation () const |
| Gets the activation method. More... | |
| virtual void | unloadRules () const |
| Unloads all the rules in the rule block. More... | |
| virtual void | loadRules (const Engine *engine) |
| Loads all the rules into the rule block. More... | |
| virtual void | reloadRules (const Engine *engine) |
| Unloads all the rules in the rule block and then loads each rule again. More... | |
| virtual std::string | toString () const |
| Returns a string representation of the rule block in the FuzzyLite Language. More... | |
| virtual Complexity | complexity () const |
| Returns the estimated complexity of activating the rule block. More... | |
| virtual void | addRule (Rule *rule) |
| Adds the given rule to the rule block. More... | |
| virtual void | insertRule (Rule *rule, std::size_t index) |
| Inserts the rule at the specified index, shifting other rules to the right. More... | |
| virtual Rule * | getRule (std::size_t index) const |
| Gets the rule at the specified index. More... | |
| virtual Rule * | removeRule (std::size_t index) |
| Removes the rule at the specified index. More... | |
| virtual std::size_t | numberOfRules () const |
| Returns the number of rules added to the rule block. More... | |
| virtual void | setRules (const std::vector< Rule *> &rules) |
| Sets the rules of the rule block. More... | |
| virtual const std::vector< Rule * > & | rules () const |
| Returns an immutable vector of the rules added to the rule block. More... | |
| virtual std::vector< Rule * > & | rules () |
| Returns a mutable vector of the rules added to the rule block. More... | |
| virtual RuleBlock * | clone () const |
| Creates a clone of the rule block without the rules being loaded. More... | |
The RuleBlock class contains a set of Rules and fuzzy logic operators required to control an Engine.
Definition at line 47 of file RuleBlock.h.
|
explicit |
| fl::RuleBlock::RuleBlock | ( | const RuleBlock & | other | ) |
|
virtual |
|
virtual |
Activates the rule block.
|
virtual |
Adds the given rule to the rule block.
| rule | is the rule to add |
|
virtual |
Creates a clone of the rule block without the rules being loaded.
|
virtual |
Returns the estimated complexity of activating the rule block.
|
virtual |
Gets the activation method.
|
virtual |
Gets the conjunction operator.
|
virtual |
Gets the description of the rule block.
|
virtual |
Gets the disjunction operator.
|
virtual |
Gets the implication operator.
|
virtual |
Gets the name of the rule block.
|
virtual |
Gets the rule at the specified index.
| index | is the index at which the rule is retrieved |
|
virtual |
Inserts the rule at the specified index, shifting other rules to the right.
| rule | is the rule to insert |
| index | is the index at which to insert the rule |
|
virtual |
Indicates whether the rule block is enabled.
|
virtual |
Loads all the rules into the rule block.
| engine | is the engine where this rule block is registered |
|
virtual |
Returns the number of rules added to the rule block.
|
virtual |
Unloads all the rules in the rule block and then loads each rule again.
| engine | is the engine where this rule block is registered |
|
virtual |
Removes the rule at the specified index.
| index | is the index at which the rule will be removed, shifting other rules to the left |
|
virtual |
Returns an immutable vector of the rules added to the rule block.
|
virtual |
Returns a mutable vector of the rules added to the rule block.
|
virtual |
Sets the activation method.
| activation | is the activation method |
|
virtual |
Sets the conjunction operator.
| conjunction | is the conjunction operator |
|
virtual |
Sets the description of the rule block.
| description | is the description of the rule block |
|
virtual |
Sets the disjunction operator.
| disjunction | is the disjunction operator |
|
virtual |
Enables the rule block.
| enabled | whether the rule block is enabled |
|
virtual |
Sets the implication operator.
| implication | is the implication operator |
|
virtual |
Sets the name of the rule block.
| name | is the name of the rule block |
|
virtual |
Sets the rules of the rule block.
| rules | is a vector of rules |
|
virtual |
Returns a string representation of the rule block in the FuzzyLite Language.
|
virtual |
Unloads all the rules in the rule block.