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

Quick Search    Search Deep

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

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

public class DotVertex
extends java.lang.Object

Graph vertex with spanning tree for ranking.


Nested Class Summary
static class DotVertex.NameComparator
          Compare DotVertex by its name (same ordering as String).
static class DotVertex.RankComparator
          Compare DotVertex by its rank (lowest rank highest priority).
 
Field Summary
private static int anonymousCount
           
private static boolean CHECK
           
private static java.lang.String CLASSNAME
           
(package private)  int counter
          A counter for general use.
private static boolean DEBUG
           
static int GRAPH
           
(package private)  DotEdge[] ins
          For efficiency, ins and outs are allowed to be accessed directly.
private  int inSize
           
(package private)  int lower
          Number of tree edges, including the parent edge.
static int MAXRANK
           
static int MINRANK
           
(package private)  java.lang.String name
           
private static java.lang.String NAME
           
static int NONE
           
(package private)  int nTreeIos
          Tree edges include the parent edge.
(package private)  java.lang.Object original
          The original IVertex/IGraph.
(package private)  DotEdge[] outs
           
private  int outSize
           
private static java.lang.String PACKAGENAME
           
(package private)  int rank
           
static int RANKMASK
           
static int SAMERANK
           
static int TOPRANK
           
(package private)  DotEdge[] treeIos
          Tree parent edge.
(package private)  DotEdge treeParent
           
(package private)  int type
           
static int TYPEMASK
           
(package private)  int upper
          Depth first search index range lower bound for this subtree.
private static int VERSION
           
private static java.lang.String VERSIONNAME
           
static int VERTEX
           
 
Constructor Summary
DotVertex(com.port80.graph.IGraph g)
          Force subgraph to the specified rank.
DotVertex(int type)
           
DotVertex(com.port80.graph.IVertex v)
           
DotVertex(java.lang.String name, int type)
           
 
Method Summary
 void addIn(DotEdge e)
           
 void addOut(DotEdge e)
           
 void addTreeEdge(DotEdge e)
          Add e to treeIos.
 DotEdge[] getIns()
           
 java.lang.String getName()
           
 java.lang.Object getOriginal()
           
 DotEdge[] getOuts()
           
 int getRank()
           
 int getType()
           
private  DotEdge[] grow(DotEdge[] a)
           
 int initRange(DotEdge p, int low)
          Label each vertices of a tree with the range of DFS index under its subtree.
 int inSize()
           
 boolean isDecendent(DotVertex v)
           
 boolean isForceMaxRank()
           
 boolean isForceMinRank()
           
 boolean isForceSameRank()
           
 boolean isForceTopRank()
           
 boolean isGraph()
           
 boolean isVertex()
           
 int outSize()
           
 int removeIn(DotEdge e)
           
 int removeOut(DotEdge e)
           
 void removeTreeEdge(DotEdge e)
          Remove e from treeIos.
 void setOriginal(java.lang.Object original)
           
 void setType(int t)
           
 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

anonymousCount

private static int anonymousCount

NONE

public static final int NONE
See Also:
Constant Field Values

TYPEMASK

public static final int TYPEMASK
See Also:
Constant Field Values

VERTEX

public static final int VERTEX
See Also:
Constant Field Values

GRAPH

public static final int GRAPH
See Also:
Constant Field Values

RANKMASK

public static final int RANKMASK
See Also:
Constant Field Values

TOPRANK

public static final int TOPRANK
See Also:
Constant Field Values

SAMERANK

public static final int SAMERANK
See Also:
Constant Field Values

MINRANK

public static final int MINRANK
See Also:
Constant Field Values

MAXRANK

public static final int MAXRANK
See Also:
Constant Field Values

type

int type

name

java.lang.String name

original

java.lang.Object original
The original IVertex/IGraph.


ins

DotEdge[] ins
For efficiency, ins and outs are allowed to be accessed directly. However, DON'T trust the array length, use inSize() and outSize().


outs

DotEdge[] outs

inSize

private int inSize

outSize

private int outSize

rank

int rank

treeParent

DotEdge treeParent

treeIos

DotEdge[] treeIos
Tree parent edge.


nTreeIos

int nTreeIos
Tree edges include the parent edge.


lower

int lower
Number of tree edges, including the parent edge.


upper

int upper
Depth first search index range lower bound for this subtree.


counter

int counter
A counter for general use. User should not assume any init. value.

Constructor Detail

DotVertex

public DotVertex(int type)

DotVertex

public DotVertex(java.lang.String name,
                 int type)

DotVertex

public DotVertex(com.port80.graph.IVertex v)

DotVertex

public DotVertex(com.port80.graph.IGraph g)
Force subgraph to the specified rank.

Method Detail

getType

public int getType()

isGraph

public boolean isGraph()

isVertex

public boolean isVertex()

isForceTopRank

public boolean isForceTopRank()

isForceSameRank

public boolean isForceSameRank()

isForceMinRank

public boolean isForceMinRank()

isForceMaxRank

public boolean isForceMaxRank()

getName

public java.lang.String getName()

getIns

public DotEdge[] getIns()

getOuts

public DotEdge[] getOuts()

inSize

public int inSize()

outSize

public int outSize()

isDecendent

public boolean isDecendent(DotVertex v)

getOriginal

public java.lang.Object getOriginal()

getRank

public int getRank()

setType

public void setType(int t)

setOriginal

public void setOriginal(java.lang.Object original)

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


removeIn

public int removeIn(DotEdge e)

removeOut

public int removeOut(DotEdge e)

addIn

public void addIn(DotEdge e)

addOut

public void addOut(DotEdge e)

grow

private DotEdge[] grow(DotEdge[] a)

removeTreeEdge

public void removeTreeEdge(DotEdge e)
Remove e from treeIos.


addTreeEdge

public void addTreeEdge(DotEdge e)
Add e to treeIos.


initRange

public int initRange(DotEdge p,
                     int low)
Label each vertices of a tree with the range of DFS index under its subtree. This provide a quick way to determine if a given vertex V (with DFS order number Vi) is under the subtree T (with range Tl,Tu). V is under the subtree if: Tl<=Vi<=Tu . The DFS index is the index of the vertex in a DFS result list. The first (ie. the lower-left) vertex index=lower of the root, given when the method is first invoked. . The tree edges are treated as non-directional so search propagate to both in and out edges.