Package HAL.GridsAndAgents
Class Grid1Dobject<T>
- java.lang.Object
-
- HAL.GridsAndAgents.Grid1Dobject<T>
-
- All Implemented Interfaces:
Grid1D
,java.io.Serializable
public class Grid1Dobject<T> extends java.lang.Object implements Grid1D, java.io.Serializable
a 1D Grid of objects- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Grid1Dobject(int xDim)
creates a new Grid1Dobject of length xDim wtihout wraparoundGrid1Dobject(int xDim, boolean wrapX)
creates a new Grid1Ddouble of length xDim with optional wraparound
-
Method Summary
Modifier and Type Method Description T
Get(int x)
gets the current field value at the specified indexT[]
GetField()
boolean
IsWrapX()
int
Length()
void
Set(int x, T val)
sets the current field value at the specified indexvoid
SetAll(T val)
sets all squares in current the field to the specified valueint
Xdim()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface HAL.Interfaces.Grid1D
ApplyHood, ApplyHoodMapped, ApplyRectangle, ContainsValidI, DispX, Dist, DistSquared, GetHoodI, In, In, InWrap, InWrap, MapHood, MapHood, MapXpt, MapXsq, RandomHoodI, WrapI
-
-
-
-
Method Detail
-
Get
public T Get(int x)
gets the current field value at the specified index
-
GetField
public T[] GetField()
-
Set
public void Set(int x, T val)
sets the current field value at the specified index
-
SetAll
public void SetAll(T val)
sets all squares in current the field to the specified value
-
-