time_constraint.constr_eval
Class bintree

java.lang.Object
  |
  +--time_constraint.constr_eval.bintree

public class bintree
extends java.lang.Object

The bintree class implements the tree that represents the constraint. A constraint is written in the polish infix form. An example is:

(B,S,x,p) - and(Once([A;S;y;0],before([A;T;x;0])))

The related tree is:

Since:
Version 1.2
Version:
1.0
Author:
Daniela Olivieri

Field Summary
 bintree left
          Represents the left tree of the binary tree.
 binnode n
          Represents a node of the binary tree.
 bintree parent
          Represents the binary tree whose son is n.
 bintree right
          Represents the right tree of the binary tree.
 
Constructor Summary
bintree()
          Initializes the binary tree.
 
Method Summary
 void add(binnode n1)
          Adds the node n1 to the binary tree.
 void buildtree(java.util.StringTokenizer st, java.util.Vector table)
          Constructs the binary tree from the string st.
 boolean emptyTree()
          Checks if the binary tree is empty.
 void writetree()
          Writes the tree to standard output.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

public binnode n
Represents a node of the binary tree.
Since:
Version 1.0

left

public bintree left
Represents the left tree of the binary tree.
Since:
Version 1.0

right

public bintree right
Represents the right tree of the binary tree.
Since:
Version 1.0

parent

public bintree parent
Represents the binary tree whose son is n.
Since:
Version 1.0
Constructor Detail

bintree

public bintree()
Initializes the binary tree.
Since:
Version 1.0
Method Detail

add

public void add(binnode n1)
Adds the node n1 to the binary tree.
Since:
Version 1.0

buildtree

public void buildtree(java.util.StringTokenizer st,
                      java.util.Vector table)
Constructs the binary tree from the string st.
Parameters:
st - is the string containing the constraint.
table - represents the evaluation environment (a vector of vardom) of the existential and universal quantifier.
Since:
Version 1.0

writetree

public void writetree()
Writes the tree to standard output.
Since:
Version 1.0

emptyTree

public boolean emptyTree()
Checks if the binary tree is empty. Returns TRUE if the tree is empty, FALSE otherwise.
Since:
Version 1.0