|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.swans.field.Spatial
jist.swans.field.Spatial.HierGrid
public static class Spatial.HierGrid
Hierarchical binning.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jist.swans.field.Spatial |
---|
Spatial.Grid, Spatial.HierGrid, Spatial.LinearList, Spatial.SpatialTransmitVisitor, Spatial.SpatialVisitor, Spatial.TiledWraparound |
Field Summary | |
---|---|
private Spatial[] |
bins
array of sub-bins. |
static int |
BL
sub-bin constants. |
static int |
BR
sub-bin constants. |
private Location |
mid
bin mid-point. |
static int |
TL
sub-bin constants. |
static int |
TR
sub-bin constants. |
Fields inherited from class jist.swans.field.Spatial |
---|
bl, br, size, tl, tr |
Constructor Summary | |
---|---|
Spatial.HierGrid(Location tr,
int height)
Create new hierarchical bin. |
|
Spatial.HierGrid(Location bl,
Location tr,
int height)
Create new hierarchical bin. |
|
Spatial.HierGrid(Location bl,
Location br,
Location tl,
Location tr,
int height)
Create new hierarchical bin. |
Method Summary | |
---|---|
void |
add(Field.RadioData rd)
Add a radio to bin. |
void |
del(Field.RadioData rd)
Delete a radio from bin. |
private Spatial |
getBin(Location loc)
Helper method to determine sub-bin for location. |
Field.RadioData |
move(Field.RadioData rd,
Location l2)
Update a radio location. |
int |
visit(Spatial.SpatialVisitor visitor)
Visit radios in bin. |
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 jist.swans.field.Spatial |
---|
area, getBottomLeft, getNearest, getSize, getTopRight, moveInside |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int BL
public static int BR
public static int TL
public static int TR
private final Spatial[] bins
private final Location mid
Constructor Detail |
---|
public Spatial.HierGrid(Location tr, int height)
tr
- top-right corner locationheight
- height in bin treepublic Spatial.HierGrid(Location bl, Location tr, int height)
bl
- bottom-left corner locationtr
- top-right corner locationheight
- height in bin treepublic Spatial.HierGrid(Location bl, Location br, Location tl, Location tr, int height)
bl
- bottom-left corner locationbr
- bottom-right corner locationtl
- top-left corner locationtr
- top-right corner locationheight
- height in bin treeMethod Detail |
---|
private Spatial getBin(Location loc)
loc
- location to descend towards
public void add(Field.RadioData rd)
add
in class Spatial
rd
- radio information (location inside bin limits)public void del(Field.RadioData rd)
del
in class Spatial
rd
- radio information (location inside bin limits)public Field.RadioData move(Field.RadioData rd, Location l2)
move
in class Spatial
rd
- radio informationl2
- destination of move
public int visitTransmit(Spatial.SpatialTransmitVisitor visitor, RadioInfo srcInfo, Location srcLoc, Message msg, java.lang.Long durationObj, double limit)
visitTransmit
in class Spatial
visitor
- transmission visitor objectsrcInfo
- transmission source radiosrcLoc
- transmission source locationmsg
- message to transmitdurationObj
- transmission durationlimit
- propagation limit
public int visit(Spatial.SpatialVisitor visitor)
visit
in class Spatial
visitor
- visitor object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |