org.jscience.computing.ai.expertsystem.rete
Class JoinReteNode

java.lang.Object
  extended by org.jscience.computing.ai.expertsystem.rete.ReteNode
      extended by org.jscience.computing.ai.expertsystem.rete.JoinReteNode

public class JoinReteNode
extends ReteNode

A node in the Rete network that has more than one input, so that objects coming from distinct parts of the network are joined together in instances of this class.


Constructor Summary
JoinReteNode(int numberInputs, AbstractRuleBase ruleBase, int ruleIndex, int declIndex)
          Class constructor.
 
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 given object from the memory of this node.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class org.jscience.computing.ai.expertsystem.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
 

Constructor Detail

JoinReteNode

public JoinReteNode(int numberInputs,
                    AbstractRuleBase ruleBase,
                    int ruleIndex,
                    int declIndex)
Class constructor.

Parameters:
numberInputs - the number of inputs of this node.
ruleBase - the rule base used to check if this node can be activated.
ruleIndex - the index of the rule that contains the condition to be checked by this node.
declIndex - the index of the declaration being joined by this node.
Method Detail

flush

public void flush()
Remove all objects that may be stored in 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.

remove

public void remove(java.lang.Object obj)
Remove the given object from the memory of this node.

Parameters:
obj - the object to be removed.

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.