Package repast.simphony.space.continuous
Class DefaultContinuousSpace<T>
- java.lang.Object
-
- repast.simphony.space.projection.DefaultProjection<T>
-
- repast.simphony.space.continuous.AbstractContinuousSpace<T,Map<NdPoint,Object>>
-
- repast.simphony.space.continuous.DefaultContinuousSpace<T>
-
- All Implemented Interfaces:
ContinuousSpace<T>
,Projection<T>
- Direct Known Subclasses:
ContextSpace
,DefaultPhysicsSpace
public class DefaultContinuousSpace<T> extends AbstractContinuousSpace<T,Map<NdPoint,Object>>
Default implementation of an n-dimensional continuous space.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
AbstractContinuousSpace.PointHolder
-
-
Field Summary
-
Fields inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
accessor, adder, agentLocationMap, dimensions, locationStorage, size, translator
-
Fields inherited from class repast.simphony.space.projection.DefaultProjection
listeners, name
-
-
Constructor Summary
Constructors Constructor Description DefaultContinuousSpace(String name, double... size)
Constructs this space with the specified name and size.DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, double... size)
Constructs this space with the specified name, adder, translator, accessor and size.DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, double[] size, double[] origin)
Constructs this space with the specified name, adder, translator, accessor and size.DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, CoordinateAccessor<T,Map<NdPoint,Object>> accessor, double... 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 protected Map<NdPoint,Object>
createLocationStorage()
-
Methods inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
doMove, evaluate, getAdder, getDimensions, getDisplacement, getDistance, getDistanceSq, getLocation, getLocation, getObjectAt, getObjects, getObjectsAt, getPointTranslator, getRandomObjectAt, isPeriodic, moveByDisplacement, moveByVector, moveTo, remove, removeAll, setAdder, setPointTranslator, 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
-
DefaultContinuousSpace
public DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, double... 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
-
DefaultContinuousSpace
public DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, double[] size, double[] origin)
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 spaceorigin
- the origin of the space
-
DefaultContinuousSpace
public DefaultContinuousSpace(String name, ContinuousAdder<T> adder, PointTranslator translator, CoordinateAccessor<T,Map<NdPoint,Object>> accessor, double... 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
-
DefaultContinuousSpace
public DefaultContinuousSpace(String name, double... 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 aSimpleContinuousAdder
, 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
protected Map<NdPoint,Object> createLocationStorage()
- Specified by:
createLocationStorage
in classAbstractContinuousSpace<T,Map<NdPoint,Object>>
-
-