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

Quick Search    Search Deep

com.port80.graph.dot.impl
Class Untangle.Cell  view Untangle.Cell download Untangle.Cell.java

java.lang.Object
  extended bycom.port80.graph.dot.impl.Untangle.Cell
Enclosing class:
Untangle

private final class Untangle.Cell
extends java.lang.Object

Min. cross from one cell to another.


Field Summary
static int BUS
          Virtual vertex (EDGE,EDGELABEL) center.
(package private)  int coln
          rown is same as rank if graph.minRank==0.
(package private)  int[] crossCost
           
(package private)  int curCost
          Sum of all xPenalty crossing this edge (but not yet multiplied by xPenalty of the edge).
static int ERASED
          Available for routing.
(package private)  int estTotal
          Current total cost from src.
(package private)  Untangle.Cell leftVertex
          Parent cell on the best path to this cell.
(package private)  int mark
          Mark that cell has been visited.
private static java.lang.String NAME
           
(package private)  Untangle.Cell parent
          Estimated total=curCost+est.
(package private)  int rown
           
static int SPACE
           
(package private)  int type
           
(package private)  VirtualVertex vertex
          The vertex at this cell.
static int VERTEX
          Vertex center, type>VERTEX are occupied by a VirtualVertex, not avaiable for routing.
static int VIRTUAL
           
 
Constructor Summary
(package private) Untangle.Cell(int rn, int cn)
          The first VERTEX cell to the left of this.
(package private) Untangle.Cell(int type, int rn, int cn, VirtualVertex v)
           
(package private) Untangle.Cell(int rn, int cn, VirtualVertex v)
           
 
Method Summary
(package private)  boolean accept(Untangle.Cell parent, Untangle.Cell dest, VirtualEdge segment, int crosscost, int oldcost, Untangle.CellHeap queue)
          Visit this cell from parent through the edge chain 'chain'.
 int compareTo(java.lang.Object a)
           
(package private)  void erase(Untangle.CellList ret)
          Convert this cell and cells controlled by this cell to SPACE.
(package private)  int estimate(Untangle.Cell dest)
          Estimate cost to destination.
(package private)  Untangle.Cell findLeftVertex()
           
(package private)  VirtualVertex getVertex()
           
(package private)  boolean reached(Untangle.Cell dest)
          Check if this cell is one of the destination.
(package private)  void reset()
          Reset to init.
(package private)  void restore(Untangle.Cell c)
          Restore cell from previous save state.
(package private)  Untangle.Cell save()
           
(package private)  void setLeftVertex(Untangle.Cell c)
           
(package private)  void setVertex(VirtualVertex v)
          Set a cell to vertex 'v'.
(package private)  void toGeneralPath(java.lang.StringBuffer buf, java.lang.String fill)
           
 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

SPACE

public static final int SPACE
See Also:
Constant Field Values

ERASED

public static final int ERASED
Available for routing.

See Also:
Constant Field Values

VERTEX

public static final int VERTEX
Vertex center, type>VERTEX are occupied by a VirtualVertex, not avaiable for routing.

See Also:
Constant Field Values

VIRTUAL

public static final int VIRTUAL
See Also:
Constant Field Values

BUS

public static final int BUS
Virtual vertex (EDGE,EDGELABEL) center.

See Also:
Constant Field Values

vertex

VirtualVertex vertex
The vertex at this cell.


type

int type

rown

int rown

coln

int coln
rown is same as rank if graph.minRank==0.


mark

int mark
Mark that cell has been visited. Each routing increment a counter for the mark and thus no need to reset the mark after each routing.


crossCost

int[] crossCost

curCost

int curCost
Sum of all xPenalty crossing this edge (but not yet multiplied by xPenalty of the edge).


estTotal

int estTotal
Current total cost from src. to this cell.


parent

Untangle.Cell parent
Estimated total=curCost+est.


leftVertex

Untangle.Cell leftVertex
Parent cell on the best path to this cell.

Constructor Detail

Untangle.Cell

Untangle.Cell(int rn,
              int cn)
The first VERTEX cell to the left of this.


Untangle.Cell

Untangle.Cell(int type,
              int rn,
              int cn,
              VirtualVertex v)

Untangle.Cell

Untangle.Cell(int rn,
              int cn,
              VirtualVertex v)
Method Detail

getVertex

VirtualVertex getVertex()

save

Untangle.Cell save()

restore

void restore(Untangle.Cell c)
Restore cell from previous save state. Only type and vertex may have changed.


reset

void reset()
Reset to init. state.


setVertex

void setVertex(VirtualVertex v)
Set a cell to vertex 'v'.


estimate

int estimate(Untangle.Cell dest)
Estimate cost to destination.


setLeftVertex

void setLeftVertex(Untangle.Cell c)

findLeftVertex

Untangle.Cell findLeftVertex()

erase

void erase(Untangle.CellList ret)
Convert this cell and cells controlled by this cell to SPACE.


reached

boolean reached(Untangle.Cell dest)
Check if this cell is one of the destination. FIXME: For now, we always have line destination.


accept

boolean accept(Untangle.Cell parent,
               Untangle.Cell dest,
               VirtualEdge segment,
               int crosscost,
               int oldcost,
               Untangle.CellHeap queue)
Visit this cell from parent through the edge chain 'chain'.


compareTo

public int compareTo(java.lang.Object a)

toGeneralPath

void toGeneralPath(java.lang.StringBuffer buf,
                   java.lang.String fill)

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