edu.mit.sketch.ddg
Class ConstraintGraphEdgeList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--edu.mit.sketch.ddg.ConstraintGraphEdgeList
All Implemented Interfaces:
Cloneable, Collection, List, Serializable

public class ConstraintGraphEdgeList
extends Vector

Represents a list of directed edges from one Primitive to others in the constraint graph. This is a list of ConstraintGraphEdge's

ConstraintGraphEdgeList.java Created: Sun Feb 10 19:04:00 2002

See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ConstraintGraphEdgeList()
           
 
Method Summary
 void addEdge(Primitive primitive, double confidence, double relevance)
          Add an edge
 ConstraintGraphEdge getEdge(int index)
          Get edge at a given index.
 ConstraintGraphEdge getEdge(Primitive primitive)
          Get edge to the given primitive.
 void print(Primitive p1)
          Print the edges.
 ConstraintGraphEdge removeEdge(int index)
          Remove an edge at a given index.
 ConstraintGraphEdge removeEdge(Primitive primitive)
          Remove and edge to a given primitive and return it.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ConstraintGraphEdgeList

public ConstraintGraphEdgeList()
Method Detail

addEdge

public void addEdge(Primitive primitive,
                    double confidence,
                    double relevance)
Add an edge

getEdge

public ConstraintGraphEdge getEdge(Primitive primitive)
Get edge to the given primitive. Returns null if the edge was not found.

getEdge

public ConstraintGraphEdge getEdge(int index)
Get edge at a given index. Returnd null if the index is invalid.

removeEdge

public ConstraintGraphEdge removeEdge(Primitive primitive)
Remove and edge to a given primitive and return it. Returns null if the edge is not found.

removeEdge

public ConstraintGraphEdge removeEdge(int index)
Remove an edge at a given index. Returns null if the edge is not found.

print

public void print(Primitive p1)
Print the edges.