public class RouteNode extends Object implements Comparable<RouteNode>
Modifier and Type | Field and Description |
---|---|
int |
cost
This is the routing cost of using this node in the current route
|
int |
history
This is the combined cost of a node when it is used, and used multiple times
|
int |
level
This is the number of hops from the original source of the route this node is
|
RouteNode |
parent
This is the pointer to a parent node in the route it is a part of
|
Tile |
tile
This is the tile where the node/wire resides
|
int |
wire
This is the enumerated int that represents the name of the wire specified
|
Constructor and Description |
---|
RouteNode()
Empty constructor, sets tile and wires to null.
|
RouteNode(Node n) |
RouteNode(SitePinInst p) |
RouteNode(String nodeName,
Device dev)
Convenience constructor that takes the Node name
"<Tile>/<Wire>" and
creates the node. |
RouteNode(Tile tile,
int wire)
A quick population constructor, parent is set to null, and the level is 0.
|
RouteNode(Tile tile,
int wire,
RouteNode parent,
int level)
A quick population constructor.
|
RouteNode(Wire wire,
RouteNode parent)
Constructor common for routing expansion
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RouteNode node)
The priority queue will use strictly the cost to evaluate priority
|
RouteNode |
createNode(Wire w) |
RouteNode |
createNode(Wire w,
RouteNode parent) |
static PriorityQueue<RouteNode> |
createPriorityQueue()
Creates a new priority queue that sorts route nodes based on
their lowest cost (see
RouteNode.getCost() ). |
boolean |
equals(Object obj) |
ArrayList<Wire> |
getBackwardConnections() |
List<PIP> |
getBackwardPIPs() |
RouteNode |
getBaseWire() |
List<Wire> |
getConnections()
Gets all the possible connections to leaving this node
|
int |
getCost()
Returns the current cost of this node
|
RouteNode |
getEndNode(PIP p)
Creates a new node representing the end wire of this PIP
|
List<PIP> |
getForwardPIPs() |
int |
getHistory() |
IntentCode |
getIntentCode() |
int |
getLevel() |
int |
getManhattanDistance(RouteNode snk) |
String |
getName() |
RouteNode |
getParent() |
ArrayList<PIP> |
getPIPsBackToSource() |
ArrayList<PIP> |
getPIPsForwardToSink() |
RouteNode |
getStartNode(PIP p)
Creates a new node representing the start wire of this PIP
|
Tile |
getTile() |
int |
getWire() |
List<Wire> |
getWireConnections() |
int |
getWireIndex(String wireName) |
String |
getWireName() |
Wire[] |
getWiresInNode() |
int |
hashCode() |
boolean |
matches(String tileName,
String wireName)
Quick check to see if the tile/wire combination match this node.
|
void |
setCost(int cost) |
void |
setHistory(int history) |
void |
setLevel(int level) |
void |
setParent(RouteNode parent) |
void |
setTile(Tile tile) |
void |
setTileAndWire(Tile tile,
int wire)
A quick setter method for the tile and wire.
|
void |
setTileAndWire(Wire wire) |
void |
setWire(int wire) |
String |
toString() |
public Tile tile
public int wire
public int cost
public RouteNode parent
public int level
public int history
public RouteNode()
public RouteNode(Tile tile, int wire)
tile
- The tile of the new node.wire
- The wire of the new node.public RouteNode(Wire wire, RouteNode parent)
wire
- Wire object to construct route node fromparent
- The parent of the wire in the expanion searchpublic RouteNode(Tile tile, int wire, RouteNode parent, int level)
tile
- The tile of the new node.wire
- The wire of the new node.parent
- The parent of the new node, or null if none.level
- The number of nodes between this node and the source node.public RouteNode(SitePinInst p)
public RouteNode(Node n)
public RouteNode(String nodeName, Device dev)
"<Tile>/<Wire>"
and
creates the node.nodeName
- Name of the nodedev
- Device to which the node belongspublic void setTileAndWire(Tile tile, int wire)
tile
- The new tile of the node.wire
- The new wire of the node.public void setTileAndWire(Wire wire)
public List<Wire> getConnections()
public int getCost()
public int getLevel()
public void setLevel(int level)
level
- the number of hops from the source to this nodepublic Tile getTile()
public void setTile(Tile tile)
tile
- the tile to setpublic void setCost(int cost)
public RouteNode getParent()
public void setParent(RouteNode parent)
parent
- the parent to setpublic int getWire()
public void setWire(int wire)
wire
- the wire to setpublic int getHistory()
public void setHistory(int history)
history
- the history to setpublic int getManhattanDistance(RouteNode snk)
public int compareTo(RouteNode node)
compareTo
in interface Comparable<RouteNode>
public boolean matches(String tileName, String wireName)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public String getName()
public String getWireName()
public int getWireIndex(String wireName)
public List<Wire> getWireConnections()
public List<PIP> getBackwardPIPs()
public List<PIP> getForwardPIPs()
public IntentCode getIntentCode()
public ArrayList<Wire> getBackwardConnections()
public RouteNode getBaseWire()
public ArrayList<PIP> getPIPsForwardToSink()
public ArrayList<PIP> getPIPsBackToSource()
public Wire[] getWiresInNode()
public RouteNode getStartNode(PIP p)
public RouteNode getEndNode(PIP p)
public static PriorityQueue<RouteNode> createPriorityQueue()
RouteNode.getCost()
).