|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.swans.field.Spatial
public abstract class Spatial
Root of all spatial data structures.
Nested Class Summary | |
---|---|
static class |
Spatial.Grid
Grid-based binning. |
static class |
Spatial.HierGrid
Hierarchical binning. |
static class |
Spatial.LinearList
Linear-lookup (no binning). |
static interface |
Spatial.SpatialTransmitVisitor
Transmission visitor object. |
static interface |
Spatial.SpatialVisitor
General radio visitor object. |
static class |
Spatial.TiledWraparound
Tile wraparound spatial implementation. |
Field Summary | |
---|---|
protected Location.Location2D |
bl
Spatial data structure endpoints. |
protected Location.Location2D |
br
Spatial data structure endpoints. |
protected int |
size
Number of nodes in data structure. |
protected Location.Location2D |
tl
Spatial data structure endpoints. |
protected Location.Location2D |
tr
Spatial data structure endpoints. |
Constructor Summary | |
---|---|
Spatial(Location tr)
Create new (abstract) bin. |
|
Spatial(Location bl,
Location tr)
Create new (abstract) bin. |
|
Spatial(Location bl,
Location br,
Location tl,
Location tr)
Create new (abstract) bin. |
Method Summary | |
---|---|
abstract void |
add(Field.RadioData radioData)
Add a radio to bin. |
double |
area()
Compute area of bin. |
abstract void |
del(Field.RadioData radioData)
Delete a radio from bin. |
Location |
getBottomLeft()
Return bottom-left coordinate. |
Location |
getNearest(Location src)
Get nearest corner to location. |
int |
getSize()
Return number of radios in bin. |
Location |
getTopRight()
Return top-right coordinate. |
abstract Field.RadioData |
move(Field.RadioData radioData,
Location newLoc)
Update a radio location. |
void |
moveInside(Field.RadioData rd,
Location newLoc)
Update a radio location, but new location is still within same bin. |
abstract int |
visit(Spatial.SpatialVisitor visitor)
Visit radios in bin. |
abstract int |
visitTransmit(Spatial.SpatialTransmitVisitor visitor,
RadioInfo srcInfo,
Location srcLoc,
Message msg,
java.lang.Long durationObj,
double limit)
Visit radios in bin with transmission visitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Location.Location2D bl
protected Location.Location2D br
protected Location.Location2D tl
protected Location.Location2D tr
protected int size
Constructor Detail |
---|
public Spatial(Location tr)
tr
- top-right corner locationpublic Spatial(Location bl, Location tr)
bl
- bottom-left corner locationtr
- top-right corner locationpublic Spatial(Location bl, Location br, Location tl, Location tr)
bl
- bottom-left corner locationbr
- bottom-right corner locationtl
- top-left corner locationtr
- top-right corner locationMethod Detail |
---|
public abstract int visitTransmit(Spatial.SpatialTransmitVisitor visitor, RadioInfo srcInfo, Location srcLoc, Message msg, java.lang.Long durationObj, double limit)
visitor
- transmission visitor objectsrcInfo
- transmission source radiosrcLoc
- transmission source locationmsg
- message to transmitdurationObj
- transmission durationlimit
- propagation limit
public abstract int visit(Spatial.SpatialVisitor visitor)
visitor
- visitor object
public abstract void add(Field.RadioData radioData)
radioData
- radio information (location inside bin limits)public abstract void del(Field.RadioData radioData)
radioData
- radio information (location inside bin limits)public abstract Field.RadioData move(Field.RadioData radioData, Location newLoc)
radioData
- radio informationnewLoc
- destination of move
public void moveInside(Field.RadioData rd, Location newLoc)
rd
- radio informationnewLoc
- destination of move (must be within bin)public Location getNearest(Location src)
src
- location outside bin
public int getSize()
public double area()
public Location getTopRight()
public Location getBottomLeft()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |