agg.cons
Class ConstraintLayer

java.lang.Object
  extended by agg.cons.ConstraintLayer

public class ConstraintLayer
extends java.lang.Object

Constraint layer is a set of layer of a given layered graph grammar. The set is backed by a hash table.


Constructor Summary
ConstraintLayer(java.util.Enumeration<Formula> constraints)
          Creates a new set of constraint layers for a given layered graph grammar.
ConstraintLayer(java.util.List<Formula> constraints)
           
ConstraintLayer(java.util.Vector<Formula> constraints)
           
 
Method Summary
 void addLayer(Formula constraint, int layer)
          Sets the layer of the specified constraint
 java.util.Hashtable<java.lang.Object,java.lang.Object> getConstraintLayer()
          Returns the constraint (formula) layer.
 java.lang.Integer getStartLayer()
          Returns the smallest layer of the formula layer.
 java.util.Hashtable<java.lang.Integer,com.objectspace.jgl.HashSet> invertLayer()
          Inverts and returns constraint layers so that a layer is a key and a set is a value.
 java.lang.String toString()
          Returns the constraint layer in a human readable way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintLayer

public ConstraintLayer(java.util.Enumeration<Formula> constraints)
Creates a new set of constraint layers for a given layered graph grammar.

Parameters:
constraints - The constraints of a graph grammar.

ConstraintLayer

public ConstraintLayer(java.util.List<Formula> constraints)

ConstraintLayer

public ConstraintLayer(java.util.Vector<Formula> constraints)
Method Detail

addLayer

public void addLayer(Formula constraint,
                     int layer)
Sets the layer of the specified constraint


getConstraintLayer

public java.util.Hashtable<java.lang.Object,java.lang.Object> getConstraintLayer()
Returns the constraint (formula) layer. A constraint is a key, a layer is a value.


getStartLayer

public java.lang.Integer getStartLayer()
Returns the smallest layer of the formula layer.

Returns:
The smallest layer.

invertLayer

public java.util.Hashtable<java.lang.Integer,com.objectspace.jgl.HashSet> invertLayer()
Inverts and returns constraint layers so that a layer is a key and a set is a value.


toString

public java.lang.String toString()
Returns the constraint layer in a human readable way.

Overrides:
toString in class java.lang.Object