Package repast.simphony.space.grid
Class FastDenseSingleOccuGrid<T>
- java.lang.Object
-
- repast.simphony.space.projection.DefaultProjection<T>
-
- repast.simphony.space.grid.AbstractGrid<T,Object[]>
-
- repast.simphony.space.grid.FastDenseSingleOccuGrid<T>
-
- All Implemented Interfaces:
Grid<T>
,Projection<T>
- Direct Known Subclasses:
ContextFastSingleGrid
public class FastDenseSingleOccuGrid<T> extends AbstractGrid<T,Object[]>
Default implementation of an n-dimensional continuous space.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FastDenseSingleOccuGrid.FastDenseAccessor<V>
An acessor for this grid class.-
Nested classes/interfaces inherited from class repast.simphony.space.grid.AbstractGrid
AbstractGrid.PointHolder
-
-
Field Summary
-
Fields inherited from class repast.simphony.space.grid.AbstractGrid
accessor, adder, agentLocationMap, dimensions, locationStorage, ok, size, translator
-
Fields inherited from class repast.simphony.space.projection.DefaultProjection
listeners, name
-
-
Constructor Summary
Constructors Constructor Description FastDenseSingleOccuGrid(String name, int... size)
Constructs this space with the specified name and size.FastDenseSingleOccuGrid(String name, GridAdder<T> adder, GridPointTranslator translator, int... size)
Constructs this space with the specified name, adder, translator, accessor and size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
createLocationStorage()
-
Methods inherited from class repast.simphony.space.grid.AbstractGrid
evaluate, getAdder, getCellAccessor, getDimensions, getDistance, getDistanceSq, getGridPointTranslator, getLocation, getObjectAt, getObjects, getObjectsAt, getRandomObjectAt, getTransformedLocation, isPeriodic, moveByDisplacement, moveByVector, moveTo, remove, removeAll, setAdder, setGridPointTranslator, size
-
Methods inherited from class repast.simphony.space.projection.DefaultProjection
addProjectionListener, fireProjectionEvent, getName, getProjectionListeners, removeProjectionListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.space.projection.Projection
addProjectionListener, getName, getProjectionListeners, removeProjectionListener
-
-
-
-
Constructor Detail
-
FastDenseSingleOccuGrid
public FastDenseSingleOccuGrid(String name, GridAdder<T> adder, GridPointTranslator translator, int... size)
Constructs this space with the specified name, adder, translator, accessor and size. The size is the size of the space meaning [3, 3] is a 3x3 space.- Parameters:
name
- the name of the spacesize
- the dimensions of the space
-
FastDenseSingleOccuGrid
public FastDenseSingleOccuGrid(String name, int... size)
Constructs this space with the specified name and size. The size is the size of the space meaning [3, 3] is a 3x3 space. This uses by default aSimpleGridAdder
, aStickyBorders
, and aMultiOccupancyCoordinateAccessor
; this means that objects cannot leave the space, are added to (0, 0, ..., 0) when added to the context, and that multiple objects can be at the same coordinate.- Parameters:
name
- the name of the spacesize
- the dimensions of the space
-
-
Method Detail
-
createLocationStorage
public Object[] createLocationStorage()
- Specified by:
createLocationStorage
in classAbstractGrid<T,Object[]>
-
-