Package HAL.GridsAndAgents
Class PopulationGridLongBase
- java.lang.Object
-
- HAL.GridsAndAgents.PopulationGridLongBase
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Integer>
- Direct Known Subclasses:
PopulationGrid1DLong
,PopulationGrid2DLong
,PopulationGrid3DLong
public class PopulationGridLongBase extends java.lang.Object implements java.lang.Iterable<java.lang.Integer>
-
-
Field Summary
Fields Modifier and Type Field Description int
length
boolean
usingSparseIndices
-
Constructor Summary
Constructors Constructor Description PopulationGridLongBase(int length)
-
Method Summary
Modifier and Type Method Description void
Add(int i, long val)
void
AddTo(int[] dest)
void
AddTo(Grid2Dint dest)
void
ApplyOccupied(IndexLongAction Action)
void
CopyTo(int[] dest)
void
CopyTo(Grid2Dint dest)
long
Get(int i)
java.util.Iterator<java.lang.Integer>
iterator()
int
OccupiedArea()
double
Pop()
void
Set(int i, int val)
void
SetAll(long val)
void
SetupSparseIndices()
void
Update()
int
UpdateCt()
-
-
-
Method Detail
-
Add
public void Add(int i, long val)
-
Set
public void Set(int i, int val)
-
SetAll
public void SetAll(long val)
-
Pop
public double Pop()
-
OccupiedArea
public int OccupiedArea()
-
UpdateCt
public int UpdateCt()
-
Get
public long Get(int i)
-
ApplyOccupied
public void ApplyOccupied(IndexLongAction Action)
-
Update
public void Update()
-
SetupSparseIndices
public void SetupSparseIndices()
-
iterator
public java.util.Iterator<java.lang.Integer> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Integer>
-
AddTo
public void AddTo(int[] dest)
-
AddTo
public void AddTo(Grid2Dint dest)
-
CopyTo
public void CopyTo(int[] dest)
-
CopyTo
public void CopyTo(Grid2Dint dest)
-
-