Class Pin - Pin.h, Pin.cc



 
Definition:
A pin is a realization of a connection for a cell (standard or otherwise).  Pin is a child of the class Point.
Typedefs:
None
Included:
#include "Point.h"


Variable Index

o int x
Inherited from the parent class, Point.  The x location of the Pin on a Cartesian plane.
o int y
Inherited from the parent class, Point.  The y location of the Pin on a Cartesian plane.
o int connected
Used during the construction of a Steiner tree.  A 'false' value indicates that the pin has not yet been visited while making the Steiner tree.

Constructor Index

o Pin()
Default constructor.
o Pin(int xVal, int yVal)
Sets the pin values x and y to the respective passes values, xVal and yVal.
o ~Pin()
Destructor.  Does absolutely nothing.
Method Index
o bool isConnected()
Returns the value of the variable, connected.
o void setConnected()
Sets the value of connected to 'true'
o int calculateCost(Point *sink, int sourceDist)
Returns the "cost" assiociated with this pin.  Function used by the maze router.  Simply the Mahattan distance from this pin to the 'sink' added to 'sourceDist'.