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

Quick Search    Search Deep

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

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

public class VirtualEdge
extends java.lang.Object

VirtualGraph edge. VirtualEdge should be create through the factory method in the VirtualGraph class. FIXME: . Instead of (head,tail), should use (tail,head) in parameters which is more natural to use.


Nested Class Summary
static class VirtualEdge.EdgeChainComparator
          Sort edge in drawing order.
 
Field Summary
private static int AUX
          Self edges.
private static int BUS
          Critical edges.
private static boolean CHECK
           
private static java.lang.String CLASSNAME
           
private static int CRITICAL
          Critical edges.
private static boolean DEBUG
           
private static int FLAT
          Inter-rank edges.
(package private)  DotSpline fUnclipped
           
protected  VirtualVertex head
           
protected  VirtualPort headPort
           
(package private)  boolean isDebug
          Cross penalty.
(package private)  int minLength
          Previous edge in the edge chain, towards the tail.
private static java.lang.String NAME
           
(package private)  VirtualEdge next
          The original IEdge this VirtualEdge represent.
private static int NONE
          VirtualEdge types.
private static int NORMAL
          Inter-rank bus edges.
(package private)  com.port80.graph.IEdge[] originals
           
private static java.lang.String PACKAGENAME
           
(package private)  VirtualEdge prev
          Next edge in the edge chain, towards the head.
private static int SELF
          Intra-rank flat edges.
(package private)  DotSpline spline
          Since VirtualEdge merge IEdge in opposite direction together, isReversed don't really meaningful.
private static int STUB
           
protected  VirtualVertex tail
           
protected  VirtualPort tailPort
           
private  int type
           
private static int VERSION
           
private static java.lang.String VERSIONNAME
           
(package private)  int weight
          =2 if edge has label.
(package private)  int xPenalty
           
 
Constructor Summary
private VirtualEdge(int type, VirtualVertex head, VirtualVertex tail, com.port80.graph.IEdge e, VirtualEdge ve, VirtualGraph parent)
          Create a virtual edge as part of an edge chain.
 
Method Summary
 int chainLength()
           
 VirtualEdge findReverseEdge()
           
 VirtualEdge findReverseFlatEdge()
           
 VirtualVertex getChainHead()
           
 VirtualVertex getChainTail()
           
 VirtualVertex getHead()
           
 int getHeadPortDx()
           
 java.lang.String getName()
           
 VirtualVertex getOpposite(VirtualVertex v)
           
 java.lang.String getOriginalName()
           
 com.port80.graph.IEdge[] getOriginals()
           
 DotSpline getSpline()
           
 VirtualVertex getTail()
           
 int getTailPortDx()
           
 int getType()
           
 DotSpline getUnclipped()
           
 boolean isAux()
           
 boolean isCritical()
           
 boolean isFlat()
           
 boolean isSelf()
           
 void merge(com.port80.graph.IEdge e)
          Represent the given edge too.
 void merge(VirtualEdge e)
          Merge the two virtual edges.
 void mergeChain(com.port80.graph.IEdge e)
          Merge the specified edge into this edge chain.
(package private) static VirtualEdge newAuxEdge(VirtualVertex head, VirtualVertex tail, VirtualEdge ve, VirtualGraph parent)
          Auxillary edges connect Vertex to its in/out bus vertices and used (by MinCross) to pull bus vertices together.
(package private) static VirtualEdge newBusEdge(VirtualVertex head, VirtualVertex tail, com.port80.graph.IEdge e, VirtualEdge ve, VirtualGraph parent)
           
(package private) static VirtualEdge newEdge(VirtualVertex head, VirtualVertex tail, com.port80.graph.IEdge e, VirtualEdge ve, VirtualGraph parent)
           
(package private) static VirtualEdge newFlatEdge(VirtualVertex head, VirtualVertex tail, com.port80.graph.IEdge e, VirtualGraph parent)
           
(package private) static VirtualEdge newSelfEdge(VirtualVertex head, com.port80.graph.IEdge e, VirtualEdge ve, VirtualGraph parent)
           
(package private) static VirtualEdge newStubEdge(VirtualVertex head, VirtualVertex tail, VirtualEdge ve, VirtualGraph parent)
           
 void reverse()
          Reverse the virtual edge.
 void setSpline(DotSpline s, DotSpline unclipped)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
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

CHECK

private static final boolean CHECK
See Also:
Constant Field Values

NONE

private static final int NONE
VirtualEdge types.

See Also:
Constant Field Values

STUB

private static final int STUB
See Also:
Constant Field Values

CRITICAL

private static final int CRITICAL
Critical edges.

See Also:
Constant Field Values

BUS

private static final int BUS
Critical edges.

See Also:
Constant Field Values

NORMAL

private static final int NORMAL
Inter-rank bus edges.

See Also:
Constant Field Values

FLAT

private static final int FLAT
Inter-rank edges.

See Also:
Constant Field Values

SELF

private static final int SELF
Intra-rank flat edges.

See Also:
Constant Field Values

AUX

private static final int AUX
Self edges.

See Also:
Constant Field Values

type

private int type

head

protected VirtualVertex head

tail

protected VirtualVertex tail

headPort

protected VirtualPort headPort

tailPort

protected VirtualPort tailPort

originals

com.port80.graph.IEdge[] originals

next

VirtualEdge next
The original IEdge this VirtualEdge represent.


prev

VirtualEdge prev
Next edge in the edge chain, towards the head.


minLength

int minLength
Previous edge in the edge chain, towards the tail.


weight

int weight
=2 if edge has label.


spline

DotSpline spline
Since VirtualEdge merge IEdge in opposite direction together, isReversed don't really meaningful.


fUnclipped

DotSpline fUnclipped

xPenalty

int xPenalty

isDebug

boolean isDebug
Cross penalty.

Constructor Detail

VirtualEdge

private VirtualEdge(int type,
                    VirtualVertex head,
                    VirtualVertex tail,
                    com.port80.graph.IEdge e,
                    VirtualEdge ve,
                    VirtualGraph parent)
Create a virtual edge as part of an edge chain.

Method Detail

newEdge

static VirtualEdge newEdge(VirtualVertex head,
                           VirtualVertex tail,
                           com.port80.graph.IEdge e,
                           VirtualEdge ve,
                           VirtualGraph parent)

newSelfEdge

static VirtualEdge newSelfEdge(VirtualVertex head,
                               com.port80.graph.IEdge e,
                               VirtualEdge ve,
                               VirtualGraph parent)

newBusEdge

static VirtualEdge newBusEdge(VirtualVertex head,
                              VirtualVertex tail,
                              com.port80.graph.IEdge e,
                              VirtualEdge ve,
                              VirtualGraph parent)

newStubEdge

static VirtualEdge newStubEdge(VirtualVertex head,
                               VirtualVertex tail,
                               VirtualEdge ve,
                               VirtualGraph parent)

newFlatEdge

static VirtualEdge newFlatEdge(VirtualVertex head,
                               VirtualVertex tail,
                               com.port80.graph.IEdge e,
                               VirtualGraph parent)

newAuxEdge

static VirtualEdge newAuxEdge(VirtualVertex head,
                              VirtualVertex tail,
                              VirtualEdge ve,
                              VirtualGraph parent)
Auxillary edges connect Vertex to its in/out bus vertices and used (by MinCross) to pull bus vertices together. Auxillary edges should be ignored for routing.


getType

public int getType()

getOriginals

public com.port80.graph.IEdge[] getOriginals()

getOriginalName

public java.lang.String getOriginalName()

isFlat

public boolean isFlat()

isSelf

public boolean isSelf()

isCritical

public boolean isCritical()

isAux

public boolean isAux()

getSpline

public DotSpline getSpline()

getUnclipped

public DotSpline getUnclipped()

setSpline

public void setSpline(DotSpline s,
                      DotSpline unclipped)

merge

public void merge(com.port80.graph.IEdge e)
Represent the given edge too.


merge

public void merge(VirtualEdge e)
Merge the two virtual edges.


mergeChain

public void mergeChain(com.port80.graph.IEdge e)
Merge the specified edge into this edge chain.


reverse

public void reverse()
Reverse the virtual edge.


getName

public java.lang.String getName()

getHead

public VirtualVertex getHead()

getTail

public VirtualVertex getTail()

getHeadPortDx

public int getHeadPortDx()

getTailPortDx

public int getTailPortDx()

getOpposite

public VirtualVertex getOpposite(VirtualVertex v)

getChainHead

public VirtualVertex getChainHead()

getChainTail

public VirtualVertex getChainTail()

chainLength

public int chainLength()

findReverseEdge

public VirtualEdge findReverseEdge()

findReverseFlatEdge

public VirtualEdge findReverseFlatEdge()

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()).