Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jeops.rete
Class FinalReteNode  view FinalReteNode download FinalReteNode.java

java.lang.Object
  extended byjeops.rete.ReteNode
      extended byjeops.rete.FinalReteNode

public class FinalReteNode
extends ReteNode

A final node in the Rete network. There will be one final node for each rule in the rule base; when objects arrive at a final node, they are stored in a conflict set element and inserted into the conflict set of the knowledge base.

Version:
1.0 14 Jul 2000

Field Summary
private  java.lang.Object[] ARRAY
          Object array, defined as an attribute for efficiency purposes only.
private  jeops.AbstractKnowledgeBase knowledgeBase
          The knowledge base that will receive the elements to pass them to the conflict set.
private  int ruleIndex
          The index of the rule correspondent to this node.
 
Fields inherited from class jeops.rete.ReteNode
 
Constructor Summary
FinalReteNode(int numberInputs, jeops.AbstractKnowledgeBase knowledgeBase, int ruleIndex)
          Creates a new discriminant rete node.
 
Method Summary
 void flush()
          Remove all objects that may be stored in this node.
 void newObject(java.lang.Object obj, int input)
          Informs this node that an object has arrived.
 void remove(java.lang.Object obj)
          Remove the following objects that may be stored in this node.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class jeops.rete.ReteNode
addSuccessor, addSuccessor, addSuccessor, getNumberInputs, getNumberOutputs, getSuccessors, propagate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

knowledgeBase

private jeops.AbstractKnowledgeBase knowledgeBase
The knowledge base that will receive the elements to pass them to the conflict set. As the conflict set can be changed when the program is being executed, it is easier to concentrate the insertion of elements in the conflict set at one single point (the knowledge base), and have all final nodes to refer that point.


ruleIndex

private int ruleIndex
The index of the rule correspondent to this node.


ARRAY

private final java.lang.Object[] ARRAY
Object array, defined as an attribute for efficiency purposes only.

Constructor Detail

FinalReteNode

public FinalReteNode(int numberInputs,
                     jeops.AbstractKnowledgeBase knowledgeBase,
                     int ruleIndex)
Creates a new discriminant rete node.

Method Detail

flush

public void flush()
Remove all objects that may be stored in this node. As no information is stored in this node, and it has no successors, this method has been overriden for performance reasons.


newObject

public void newObject(java.lang.Object obj,
                      int input)
Informs this node that an object has arrived.

Specified by:
newObject in class ReteNode

remove

public void remove(java.lang.Object obj)
Remove the following objects that may be stored in this node. As no information is stored in this node, and it has no successors, this method has been overriden for performance reasons.


toString

public java.lang.String toString()
Returns a string representation of this object. Useful for debugging.