Del via


TriggerTree Class

Definition

A trigger tree organizes evaluators according to generalization/specialization in order to make it easier to use rules.

public class TriggerTree
type TriggerTree = class
Public Class TriggerTree
Inheritance
TriggerTree

Remarks

A trigger expression generates true if the expression evaluated on a frame is true. The expression itself consists of arbitrary boolean functions ("predicates") combined with && || !. Most predicates are expressed over the frame passed in, but they can be anything--there are even ways of optimizing or comparing them. By organizing evaluators into a tree (technically a DAG) it becomes easier to use rules by reducing the coupling between rules. For example if a rule applies if some predicate A is true, then another rule that applies if A && B are true is more specialized. If the second expression is true, then because we know of the relationship we can ignore the first rule--even though its expression is true. Without this kind of capability in order to add the second rule, you would have to change the first to become A && !B.

Constructors

TriggerTree()

Initializes a new instance of the TriggerTree class.

Properties

Comparers

Gets a value of a dictionary, which has IPredicateComparer values, with string keys.

Optimizers

Gets a list of Optimizers for optimizing clauses.

Root

Gets or sets a value of the root node.

TotalTriggers

Gets or sets the total number of triggers.

Methods

AddTrigger(Expression, Object, Quantifier[])

Add a trigger expression to the tree.

AddTrigger(String, Object, Quantifier[])

Add a trigger expression to the tree.

GenerateGraph(String)

Generates a graph to given path.

Matches(Object)

Return the possible matches given the current state.

RemoveTrigger(Trigger)

Remove trigger from tree.

ToString()

Returns a string that represents the current object.

TreeToString(Int32)

Generate a string describing the tree.

VerifyTree()

Verify the tree meets specialization/generalization invariants.

Applies to