java.lang.Object
com.port80.graph.dot.impl.GridFactory.ValidXIterator
- Enclosing class:
- GridFactory
- static final class GridFactory.ValidXIterator
- extends java.lang.Object
ValidXIterator find all the valid x-coordinates that a Grid point can be created for each rank.
Grid objects are not created since only a fraction of the valid x-coordinates would be used
depend on the path cost. GridIterator is responsible for creating and maintaining Grid objects.
|
Constructor Summary |
(package private) |
GridFactory.ValidXIterator(int[] spaces,
int[] forced,
int erasedindex,
int srcx,
int espacing,
int step)
|
|
Method Summary |
(package private) int |
first()
|
(package private) boolean |
fitBetween(int left,
int right)
|
int |
next()
Get next Grid on the right of the given 'grid'. |
(package private) int |
nextX()
Typically just an increment of fESpacing is fine. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
fSpaces
int[] fSpaces
fForced
int[] fForced
fErasedIndex
int fErasedIndex
fESpacing
int fESpacing
fStep
int fStep
fX
int fX
fPrevX
int fPrevX
fOffset
int fOffset
fHalfESpacing
int fHalfESpacing
fMaxX
int fMaxX
GridFactory.ValidXIterator
GridFactory.ValidXIterator(int[] spaces,
int[] forced,
int erasedindex,
int srcx,
int espacing,
int step)
first
int first()
next
public int next()
- Get next Grid on the right of the given 'grid'.
nextX
int nextX()
- Typically just an increment of fESpacing is fine. However, extra efforts
are spent to have a Grid point at the source and destination x-coordinates
so that straight routes from/to them are possible.
To ensure vertically straight routes, grids are preferred to align vertically.
To do that, we try to align to a basic grid of fESpacing away from src on both sides.
Since each route only cross a rank once, there are no limit on spacing between
Grid points themselves as long as they have enough spacings from non-erased
vertices. So we simply add a Grid point if iterator go over the src and dest vertices.
fitBetween
boolean fitBetween(int left,
int right)