org.jscience.computing.ai.expertsystem.rete
Class FilterReteNode
java.lang.Object
org.jscience.computing.ai.expertsystem.rete.ReteNode
org.jscience.computing.ai.expertsystem.rete.FilterReteNode
public class FilterReteNode
- extends ReteNode
A discriminant node in the Rete network. A discriminant node is one that
has only one input and one output, and it will propagate the incoming
objects if some property (i.e., a boolean method call) is satisfied. This
kind of node doesn't have a memory of objects, filtering out those that
don't comply with the property.
|
Method Summary |
void |
newObject(java.lang.Object obj,
int input)
Informs this node that an object has arrived. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FilterReteNode
public FilterReteNode(AbstractKnowledgeBase knowledgeBase,
AbstractRuleBase ruleBase,
int ruleIndex,
int declIndex)
- Creates a new discriminant rete node.
- Parameters:
knowledgeBase - the knowledge base that contains this node.ruleBase - the rule base used to check the validity of the
property of the incoming objects.ruleIndex - the index of the rule that contains the
condition to be checked by this node.declIndex - the index of the declaration whose property is
checked by this node.
newObject
public void newObject(java.lang.Object obj,
int input)
- Informs this node that an object has arrived.
- Specified by:
newObject in class ReteNode
- Parameters:
obj - the object that arrived at this node.input - the input number of this node that is to receive the
object. This node has only one input, so this parameter is not
considered in objects of this class.
toString
public java.lang.String toString()
- Returns a string representation of this object. Useful for
debugging.
- Overrides:
toString in class java.lang.Object
- Returns:
- a string representation of this object.