ca.uwaterloo.cs.ql.fb
Class EdgeSet

java.lang.Object
  extended by ca.uwaterloo.cs.ql.fb.TupleSet
      extended by ca.uwaterloo.cs.ql.fb.EdgeSet
All Implemented Interfaces:
java.lang.Cloneable

public class EdgeSet
extends TupleSet


Field Summary
 
Fields inherited from class ca.uwaterloo.cs.ql.fb.TupleSet
CHAOS, HAS_DUPLICATES
 
Constructor Summary
EdgeSet()
          EdgeSet.
EdgeSet(int capacity)
          EdgeSet.
EdgeSet(java.lang.String name)
          EdgeSet.
 
Method Summary
 void add(int fr, int to)
          Adds an edge to this set efficiently.
 void add(java.lang.String fr, java.lang.String to)
          Adds an edge to this set.
 void appendRSF(java.lang.String fileName)
           
 void appendTA(java.lang.String fileName)
          Appends all element data to the end of a file.
 Edge[] getAllEdges()
           
 java.lang.String getAttribute(int nodeID)
           
 int getAttributeID(int nodeID)
          Gets a node's attribute's ID.
 TupleSet newSet()
          Needs to be overwritten.
 void printRSF(java.io.OutputStream out)
           
 void printTA(java.io.OutputStream out)
          Prints all element data to out in the TA form.
 
Methods inherited from class ca.uwaterloo.cs.ql.fb.TupleSet
add, add, appendDB, clone, columns, get, getAllTuples, getName, getTupleList, hasDuplicates, hasName, print, removeDuplicates, setFlag, setHasDuplicates, setName, size, unsetFlag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeSet

public EdgeSet()
EdgeSet.


EdgeSet

public EdgeSet(java.lang.String name)
EdgeSet.


EdgeSet

public EdgeSet(int capacity)
EdgeSet.

Method Detail

add

public void add(java.lang.String fr,
                java.lang.String to)
Adds an edge to this set.

Parameters:
fr - the bgn of the edge.
to - the end of the edge.

add

public void add(int fr,
                int to)
Adds an edge to this set efficiently.

Parameters:
fr - the bgn of the edge.
to - the end of the edge.

getAttributeID

public int getAttributeID(int nodeID)
Gets a node's attribute's ID.

Returns:
-1 if the node has no attribute.

getAttribute

public java.lang.String getAttribute(int nodeID)

getAllEdges

public Edge[] getAllEdges()

newSet

public TupleSet newSet()
Description copied from class: TupleSet
Needs to be overwritten.

Overrides:
newSet in class TupleSet

printTA

public void printTA(java.io.OutputStream out)
Description copied from class: TupleSet
Prints all element data to out in the TA form.

Overrides:
printTA in class TupleSet
Parameters:
out - the output stream.

appendTA

public void appendTA(java.lang.String fileName)
              throws java.io.IOException
Description copied from class: TupleSet
Appends all element data to the end of a file.

Overrides:
appendTA in class TupleSet
Parameters:
fileName - the output file name.
Throws:
java.io.IOException

printRSF

public void printRSF(java.io.OutputStream out)

appendRSF

public void appendRSF(java.lang.String fileName)
               throws java.io.IOException
Throws:
java.io.IOException