|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjason.environment.grid.Location
public final class Location
Field Summary | |
---|---|
int |
x
|
int |
y
|
Constructor Summary | |
---|---|
Location(int x,
int y)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
distance(Location l)
calculates the Manhattan distance between two points |
int |
distanceChebyshev(Location l)
returns the chessboard king (or Chebyshev) distance between two locations : max( |this.x - l.x| , |this.y - l.y|) |
double |
distanceEuclidean(Location l)
calculates the Euclidean distance between two points |
int |
distanceManhattan(Location l)
calculates the Manhattan distance between two points |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isInArea(Area a)
|
boolean |
isInArea(Location tl,
Location br)
|
boolean |
isNeigbour(Location l)
|
int |
maxBorder(Location l)
Deprecated. renamed to distanceChessboard |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int x
public int y
Constructor Detail |
---|
public Location(int x, int y)
Method Detail |
---|
public int distanceManhattan(Location l)
public int distance(Location l)
public double distanceEuclidean(Location l)
public int distanceChebyshev(Location l)
public int maxBorder(Location l)
public boolean isInArea(Location tl, Location br)
public boolean isInArea(Area a)
public boolean isNeigbour(Location l)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |