public class Tupel
extends java.lang.Object
Constructor and Description |
---|
Tupel(int x,
int y,
int layer,
boolean is_electric_coordinate) |
Tupel(java.awt.geom.Point2D p,
int layer)
Create tupel out of a Point2D
|
Modifier and Type | Method and Description |
---|---|
static int |
convertElectricToRoutingArrayCoordinate_X(double x)
convert x coordinate from electric to routing array
|
static int |
convertElectricToRoutingArrayCoordinate_Y(double y)
convert y coordinate from electric to routing array
|
static int |
convertRoutingArrayToElectricCoordinates_X(int x)
convert x coordinate from routing array to electric
|
static int |
convertRoutingArrayToElectricCoordinates_Y(int y)
convert y coordinate from routing array to electric
|
int |
getLayer() |
java.awt.geom.Point2D |
getLocation()
Convert location to Point2D object
|
int |
getX_InsideElectric()
returns xInsideElectric value as used in electric
|
int |
getX_InsideRoutingArray()
returns xInsideElectric value with offset
|
int |
getY_InsideElectric()
returns yInsideElectric value as used in electric
|
int |
getY_InsideRoutingArray()
returns yInsideElectric value with offset
|
boolean |
isEqual(Tupel t)
Determine whether this tupel is equal to another tupel
|
boolean |
isEqualPosition(RoutingFrame.RoutePoint rp1)
Check whether the route point has the same electric coordinates without checking the layer
|
boolean |
isEqualPosition(Tupel t)
Check whether the tupel has the same routing array coordinates without checking the layer
|
boolean |
isEqualPositionInElectric(Tupel t)
Check whether the tupel has the same electric coordinates without checking the layer
|
void |
printTupel()
print tupel
|
static void |
setOffset(double x,
double y,
int spacing,
boolean output)
Set offset, as tupel coordinates have to be positive where as electric coordinates are not
|
java.lang.String |
toString() |
public Tupel(int x, int y, int layer, boolean is_electric_coordinate)
x
- xInsideElectric valuey
- yInsideElectric valueis_electric_coordinate
- true, if coordinates are taken from electric (-> offset needs to be added)public Tupel(java.awt.geom.Point2D p, int layer)
p
- Point2Dlayer
- layerpublic static void setOffset(double x, double y, int spacing, boolean output)
x
- offset in x directiony
- offset in y directionspacing
- additional space around the cell to allow wires to leave itpublic int getX_InsideElectric()
public int getX_InsideRoutingArray()
public int getY_InsideElectric()
public int getY_InsideRoutingArray()
public int getLayer()
public void printTupel()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEqual(Tupel t)
t
- the other tupelpublic boolean isEqualPositionInElectric(Tupel t)
t
- tupel to compare withpublic boolean isEqualPosition(RoutingFrame.RoutePoint rp1)
rp1
- RoutePoint to compare withpublic boolean isEqualPosition(Tupel t)
t
- tupel to compare withpublic static int convertElectricToRoutingArrayCoordinate_X(double x)
x
- x coordinatepublic static int convertElectricToRoutingArrayCoordinate_Y(double y)
y
- y coordinatepublic static int convertRoutingArrayToElectricCoordinates_X(int x)
x
- x coordinatepublic static int convertRoutingArrayToElectricCoordinates_Y(int y)
y
- y coordinatepublic java.awt.geom.Point2D getLocation()