|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.router.polyline.PathSearchContext
public class PathSearchContext
This class provides context information that is useful for the PathSearch
algorithm.
Most notably, the context provides access to the edge that is currently being routed (see getCurrentEdge()
).
Constructor Summary | |
---|---|
protected |
PathSearchContext(PathSearch pathSearch,
PathSearchConfiguration configuration)
Creates a new instance of PathSearchContext . |
Method Summary | |
---|---|
void |
addSourceCell(PartitionCell cell)
Adds an additional source cell of the current path request if it is not already
contained in the list of source cells. |
void |
addTargetCell(PartitionCell cell)
Adds an additional target cell of the current path request if it is not already
contained in the list of target cells. |
PartitionCell |
getCombinedSourceCell()
Returns an artificial partition cell with the size of the bounding box of all source cells
of the current path request . |
PartitionCell |
getCombinedTargetCell()
Returns an artificial partition cell with the size of the bounding box of all target
cells of the current path request . |
PathSearchConfiguration |
getConfiguration()
Returns the configuration used for the PathSearch . |
Edge |
getCurrentEdge()
Returns the edge that is currently routed. |
EdgeLayoutDescriptor |
getCurrentEdgeLayoutDescriptor()
Returns the EdgeLayoutDescriptor for the current edge containing edge specific
settings for the path search. |
PathRequest |
getCurrentRequest()
Gets the PathRequest that is currently routed. |
EdgeCursor |
getEdges()
Returns the EdgeCursor to iterate over the edges that are routed. |
PathSearch |
getPathSearch()
Returns the PathSearch that uses this context. |
PathSearchResult |
getPathSearchResult()
Returns the results of the PathSearch . |
PartitionCell |
getSourceCell(int index)
Returns the source cell with the given index in the list of all cells that are covered by the source of the current path request . |
PartitionCell |
getTargetCell(int index)
Returns the target cell with the given index in the list of all cells that are covered by the target of the current path request . |
boolean |
isSourceCell(PartitionCell cell)
Determines whether or not the given cell is a source cell of the current path request . |
boolean |
isTargetCell(PartitionCell cell)
Determines whether or not the given cell is a target cell of the current path request . |
protected void |
setCurrentEdge(Edge currentEdge)
Specifies the edge that is routed. |
protected void |
setCurrentRequest(PathRequest currentRequest)
Sets the PathRequest that is currently routed. |
protected void |
setEdges(EdgeList edges)
Specifies the edges that shall be routed. |
int |
sourceCellCount()
Returns the number of all cells that are covered by the source of the current path request . |
int |
targetCellCount()
Returns the number of all cells that are covered by the target of the current path request . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PathSearchContext(PathSearch pathSearch, PathSearchConfiguration configuration)
PathSearchContext
.
pathSearch
- the path search that uses this contextconfiguration
- the configuration used for the path searchMethod Detail |
---|
public PathSearch getPathSearch()
PathSearch
that uses this context.
public PathSearchConfiguration getConfiguration()
PathSearch
.
public EdgeCursor getEdges()
EdgeCursor
to iterate over the edges that are routed.
EdgeCursor
to iterate over the edges for which a path is calculatedprotected void setEdges(EdgeList edges)
edges
- the list of edges that shall be routedpublic Edge getCurrentEdge()
This edge is one of those returned by getEdges()
.
protected void setCurrentEdge(Edge currentEdge)
currentEdge
- the edge that shall be routedpublic PathRequest getCurrentRequest()
PathRequest
that is currently routed.
This request belongs to the current edge
.
protected void setCurrentRequest(PathRequest currentRequest)
PathRequest
that is currently routed.
This request belongs to the current edge
.
currentRequest
- the path request that shall be routed.public EdgeLayoutDescriptor getCurrentEdgeLayoutDescriptor()
EdgeLayoutDescriptor
for the current edge
containing edge specific
settings for the path search.
public int sourceCellCount()
current path request
.
public void addSourceCell(PartitionCell cell)
current path request
if it is not already
contained in the list of source cells.
cell
- the new source cell to addsourceCellCount()
,
getSourceCell(int)
public PartitionCell getSourceCell(int index)
current path request
.
index
- the index of the source cell
public boolean isSourceCell(PartitionCell cell)
current path request
.
cell
- the cell
true
if the given cell is in the list of source cells, false
otherwisesourceCellCount()
,
getSourceCell(int)
public PartitionCell getCombinedSourceCell()
partition cell
with the size of the bounding box of all source cells
of the current path request
.
getSourceCell(int)
public int targetCellCount()
current path request
.
public void addTargetCell(PartitionCell cell)
current path request
if it is not already
contained in the list of target cells.
cell
- the new target cell to addtargetCellCount()
,
getTargetCell(int)
public PartitionCell getTargetCell(int index)
current path request
.
index
- the index of the target cell
current path request
public boolean isTargetCell(PartitionCell cell)
current path request
.
cell
- the cell
true
if the given cell is in the list of target cells, false
otherwisetargetCellCount()
,
getTargetCell(int)
public PartitionCell getCombinedTargetCell()
partition cell
with the size of the bounding box of all target
cells of the current path request
.
getTargetCell(int)
public PathSearchResult getPathSearchResult()
PathSearch
.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |