|
|||||||||
| Home >> All >> com >> port80 >> graph >> dot >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.port80.graph.dot.impl
Class Grid

java.lang.Objectcom.port80.graph.dot.impl.Grid
- public class Grid
- extends java.lang.Object
Dynamic grid point for Anneal (equivalent to Cell for AnnealWithCell).
| Field Summary | |
private static boolean |
CHECK
|
(package private) float |
curCost
|
private static boolean |
DEBUG
|
static int |
ERASED
|
(package private) float |
estTotal
|
private static int |
fCELL_BASICFACTOR
|
private static int |
fCELL_DISTFACTOR
|
private static int |
fCELL_TURNFACTOR
|
(package private) float |
fEstimate
|
private static int |
fMARKCOUNTER
|
private static int |
fXSPACING
|
(package private) int |
heapIndex
|
(package private) VirtualVertex |
leftVertex
|
(package private) int |
mark
|
private static java.lang.String |
NAME
|
(package private) Grid |
parent
|
static int |
QUEUE
|
(package private) int |
rank
Rank number. |
static int |
REJECT
|
static int |
REQUEUE
|
static int |
SPACE
|
(package private) VirtualVertex |
vertex
|
(package private) int |
x
X-coordinates. |
| Constructor Summary | |
(package private) |
Grid()
|
(package private) |
Grid(float est)
|
private |
Grid(int r,
int x,
float cost,
float est)
|
private |
Grid(VirtualVertex v)
|
| Method Summary | |
int |
accept(Grid parent,
VirtualVertex dest,
float cost)
Check if visit from parent would result in a better path. |
static void |
configure(VirtualGraph graph)
|
static float |
distCostOf(int dx)
Find distance cost for the given different in x-coordinate. |
static int |
distCostToX(float distcost)
Find distance that would incur the given distance cost. |
float |
estimate(VirtualVertex dest)
Optimistic estimate cost from this Grid to the given destination. |
void |
init()
Reset all temporary fields controlled by mark. |
int |
lowerCostThan(Grid a)
Find the item closer to the destination, ie. |
static Grid |
newSpaceGrid(int rank,
int x,
float cost,
float est)
|
static Grid |
newVertexGrid(VirtualVertex v)
|
(package private) static float |
pathCost(VirtualChain chain)
Determine cost of the given path. |
boolean |
reached(VirtualVertex dest)
|
static void |
resetMarks()
|
void |
setLeftVertex(VirtualVertex v)
|
void |
setVertex(VirtualVertex v)
|
void |
toGeneralPath(java.lang.StringBuffer buf,
java.lang.String color)
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
float |
travelCostFrom(Grid parent,
Grid grandparent)
|
static float |
travelCostTo(VirtualVertex child,
VirtualVertex parent,
VirtualVertex grandparent)
Travel cost to 'child' from 'parent' and 'grandparent'. |
| 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
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
CHECK
private static final boolean CHECK
- See Also:
- Constant Field Values
SPACE
public static final int SPACE
- See Also:
- Constant Field Values
ERASED
public static final int ERASED
- See Also:
- Constant Field Values
REJECT
public static final int REJECT
- See Also:
- Constant Field Values
QUEUE
public static final int QUEUE
- See Also:
- Constant Field Values
REQUEUE
public static final int REQUEUE
- See Also:
- Constant Field Values
fCELL_BASICFACTOR
private static int fCELL_BASICFACTOR
fCELL_DISTFACTOR
private static int fCELL_DISTFACTOR
fCELL_TURNFACTOR
private static int fCELL_TURNFACTOR
fMARKCOUNTER
private static int fMARKCOUNTER
fXSPACING
private static int fXSPACING
x
int x
- X-coordinates.
rank
int rank
- Rank number.
vertex
VirtualVertex vertex
leftVertex
VirtualVertex leftVertex
mark
int mark
heapIndex
int heapIndex
fEstimate
float fEstimate
curCost
float curCost
estTotal
float estTotal
parent
Grid parent
| Constructor Detail |
Grid
Grid()
Grid
Grid(float est)
Grid
private Grid(VirtualVertex v)
Grid
private Grid(int r,
int x,
float cost,
float est)
| Method Detail |
configure
public static void configure(VirtualGraph graph)
resetMarks
public static void resetMarks()
travelCostTo
public static float travelCostTo(VirtualVertex child, VirtualVertex parent, VirtualVertex grandparent)
- Travel cost to 'child' from 'parent' and 'grandparent'.
distCostOf
public static float distCostOf(int dx)
- Find distance cost for the given different in x-coordinate.
distCostToX
public static int distCostToX(float distcost)
- Find distance that would incur the given distance cost.
pathCost
static float pathCost(VirtualChain chain)
- Determine cost of the given path.
newVertexGrid
public static Grid newVertexGrid(VirtualVertex v)
newSpaceGrid
public static Grid newSpaceGrid(int rank, int x, float cost, float est)
init
public void init()
- Reset all temporary fields controlled by mark.
reached
public boolean reached(VirtualVertex dest)
accept
public int accept(Grid parent, VirtualVertex dest, float cost)
- Check if visit from parent would result in a better path.
setVertex
public void setVertex(VirtualVertex v)
setLeftVertex
public void setLeftVertex(VirtualVertex v)
travelCostFrom
public float travelCostFrom(Grid parent, Grid grandparent)
estimate
public float estimate(VirtualVertex dest)
- Optimistic estimate cost from this Grid to the given destination.
The estimate cost is static, so it is only calculated once when the Grid is first accepted.
lowerCostThan
public int lowerCostThan(Grid a)
- Find the item closer to the destination, ie. estTotal is less or curCost is larger if estTotal is same.
toGeneralPath
public void toGeneralPath(java.lang.StringBuffer buf, java.lang.String color)
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()).
|
|||||||||
| Home >> All >> com >> port80 >> graph >> dot >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.port80.graph.dot.impl.Grid