public class PathSearchContext extends Object
PathSearch
algorithm.
Most notably, the context provides access to the edge that is currently being routed (see
CurrentEdge
).
Modifier | Constructor and Description |
---|---|
protected |
PathSearchContext(PathSearch pathSearch,
PathSearchConfiguration configuration)
Creates a new instance of
PathSearchContext . |
Modifier and Type | Method and Description |
---|---|
void |
addSourceCell(PartitionCell cell)
Adds an additional source cell of the
current edge if it is not already contained in the list
of source cells. |
void |
addTargetCell(PartitionCell cell)
Adds an additional target cell of the
current edge if it is not already contained in the list
of target cells. |
PartitionCell |
getCombinedSourceCell()
Gets an artificial
partition cell with the size of the bounding box of all source cells of the
current edge . |
PartitionCell |
getCombinedTargetCell()
Gets an artificial
partition cell with the size of the bounding box of all target cells of the
current edge . |
PathSearchConfiguration |
getConfiguration()
Gets the configuration used for the
PathSearch . |
Edge |
getCurrentEdge()
Gets the edge that is currently routed.
|
EdgeLayoutDescriptor |
getCurrentEdgeLayoutDescriptor()
Gets the
EdgeLayoutDescriptor for the current edge containing edge specific settings
for the path search. |
IEdgeCursor |
getEdges()
Gets the
IEdgeCursor to iterate over the edges that are routed. |
PathSearch |
getPathSearch()
Gets the
PathSearch that uses this context. |
PathSearchResult |
getPathSearchResult()
Gets 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 node of the
current edge . |
PartitionCell |
getTargetCell(int index)
Returns the target cell with the given index in the list of all cells that are covered by the target node of the
current edge . |
boolean |
isSourceCell(PartitionCell cell)
Determines whether or not the given cell is a source cell of the
current edge . |
boolean |
isTargetCell(PartitionCell cell)
Determines whether or not the given cell is a target cell of the
current edge . |
protected void |
setCurrentEdge(Edge value)
Sets the edge 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 node of the
current edge . |
int |
targetCellCount()
Returns the number of all cells that are covered by the target node of the
current edge . |
protected PathSearchContext(PathSearch pathSearch, PathSearchConfiguration configuration)
PathSearchContext
.pathSearch
- the path search that uses this contextconfiguration
- the configuration used for the path searchpublic void addSourceCell(PartitionCell cell)
current edge
if it is not already contained in the list
of source cells.cell
- the new source cell to addsourceCellCount()
,
getSourceCell(int)
public void addTargetCell(PartitionCell cell)
current edge
if it is not already contained in the list
of target cells.cell
- the new target cell to addtargetCellCount()
,
getTargetCell(int)
public PartitionCell getCombinedSourceCell()
partition cell
with the size of the bounding box of all source cells of the
current edge
.getSourceCell(int)
public PartitionCell getCombinedTargetCell()
partition cell
with the size of the bounding box of all target cells of the
current edge
.getTargetCell(int)
public PathSearchConfiguration getConfiguration()
PathSearch
.public Edge getCurrentEdge()
This edge is one of those returned by Edges
.
public EdgeLayoutDescriptor getCurrentEdgeLayoutDescriptor()
EdgeLayoutDescriptor
for the current edge
containing edge specific settings
for the path search.public IEdgeCursor getEdges()
IEdgeCursor
to iterate over the edges that are routed.IEdgeCursor
to iterate over the edges for which a path is calculatedpublic PathSearch getPathSearch()
PathSearch
that uses this context.public PathSearchResult getPathSearchResult()
PathSearch
.public PartitionCell getSourceCell(int index)
current edge
.index
- the index of the source cellpublic PartitionCell getTargetCell(int index)
current edge
.index
- the index of the target cellcurrent edge
public boolean isSourceCell(PartitionCell cell)
current edge
.cell
- the celltrue
if the given cell is in the list of source cells, false
otherwisesourceCellCount()
,
getSourceCell(int)
public boolean isTargetCell(PartitionCell cell)
current edge
.cell
- the celltrue
if the given cell is in the list of target cells, false
otherwisetargetCellCount()
,
getTargetCell(int)
protected void setCurrentEdge(Edge value)
This edge is one of those returned by Edges
.
value
- the edge that is currently routedgetCurrentEdge()
protected void setEdges(EdgeList edges)
edges
- the list of edges that shall be routedpublic int sourceCellCount()
current edge
.public int targetCellCount()
current edge
.