Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.graph.dot.impl
Class DotEdge  view DotEdge download DotEdge.java

java.lang.Object
  extended bycom.port80.graph.dot.impl.DotEdge

public class DotEdge
extends java.lang.Object

Graph edge interface.


Field Summary
private static java.lang.String CLASSNAME
           
(package private)  int cutValue
          Edges that have merged into this one.
private static boolean DEBUG
           
(package private)  boolean fIsCritical
          Critical edges are preserved as much as possible.
protected  DotVertex head
           
(package private)  int minLength
           
private static java.lang.String NAME
           
(package private)  DotEdge next
          The original IEdge this DotEdge represent.
(package private)  com.port80.graph.IEdge original
           
private static java.lang.String PACKAGENAME
           
(package private)  boolean reversed
          treeIndex>=0 if edge is on the ranking tree.
protected  DotVertex tail
           
(package private)  int treeIndex
           
private static int VERSION
           
private static java.lang.String VERSIONNAME
           
(package private)  int weight
          =2 if edge has label.
 
Constructor Summary
DotEdge(DotVertex head, DotVertex tail, com.port80.graph.IEdge e)
           
DotEdge(DotVertex head, DotVertex tail, int minlen, int weight)
           
 
Method Summary
 DotEdge findReverseEdge()
           
 DotVertex getHead()
           
 java.lang.String getName()
           
 DotVertex getOpposite(DotVertex v)
           
 DotVertex getTail()
           
 void initCutValue()
          Calcuate cut value, assuming cutValue of edges on the child side were already set.
 boolean isCritical()
           
 boolean isReversed()
           
 int length()
           
 void merge(DotEdge e)
          Merge the specified edge into this one.
 void reverse()
          Reverse this edge.
 void setCritical(boolean critical)
           
 int slack()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
private  int xValue(DotVertex v, boolean tailside)
          Determine xValue of an edge depending on its edge type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

PACKAGENAME

private static final java.lang.String PACKAGENAME
See Also:
Constant Field Values

CLASSNAME

private static final java.lang.String CLASSNAME
See Also:
Constant Field Values

VERSION

private static final int VERSION
See Also:
Constant Field Values

VERSIONNAME

private static final java.lang.String VERSIONNAME
See Also:
Constant Field Values

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

head

protected DotVertex head

tail

protected DotVertex tail

minLength

int minLength

weight

int weight
=2 if edge has label.


original

com.port80.graph.IEdge original

next

DotEdge next
The original IEdge this DotEdge represent.


cutValue

int cutValue
Edges that have merged into this one.


treeIndex

int treeIndex

reversed

boolean reversed
treeIndex>=0 if edge is on the ranking tree.


fIsCritical

boolean fIsCritical
Critical edges are preserved as much as possible. Effort is spent to keep it from being reversed.

Constructor Detail

DotEdge

public DotEdge(DotVertex head,
               DotVertex tail,
               int minlen,
               int weight)

DotEdge

public DotEdge(DotVertex head,
               DotVertex tail,
               com.port80.graph.IEdge e)
Method Detail

initCutValue

public void initCutValue()
Calcuate cut value, assuming cutValue of edges on the child side were already set.


xValue

private int xValue(DotVertex v,
                   boolean tailside)
Determine xValue of an edge depending on its edge type. . xValue of an edge is determined by its direction and whether it is a tree edge or non-tree edge. . The sign of the xValue is determined by: child(v) other other tailside tailside childside sign (ct) (ot) (oc) --------------------------------------- 0 0 0 0 (-ve) 0 0 1 1 (+ve) 0 1 0 1 0 1 1 0 --------------------------------------- 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 --------------------------------------- ie. ct^ot^oc


length

public int length()

slack

public int slack()

isReversed

public boolean isReversed()

reverse

public void reverse()
Reverse this edge.


merge

public void merge(DotEdge e)
Merge the specified edge into this one.


getName

public java.lang.String getName()

getHead

public DotVertex getHead()

getTail

public DotVertex getTail()

getOpposite

public DotVertex getOpposite(DotVertex v)

isCritical

public boolean isCritical()

setCritical

public void setCritical(boolean critical)

findReverseEdge

public DotEdge findReverseEdge()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).