Package org.baseagent.grid
Class GridLayer
java.lang.Object
org.baseagent.grid.GridLayer
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionGridLayer
(String layerName, Grid parentGrid, GridLayer.GridLayerUpdateOption updateOption) GridLayer
(Grid parentGrid, GridLayer.GridLayerUpdateOption updateOption) -
Method Summary
Modifier and TypeMethodDescriptiondouble
average4Neighbors
(int x, int y) double
average8Neighbors
(int x, int y) double
average9Neighbors
(int x, int y) void
clear
(int x, int y) void
clear
(GridPosition position) long
int
count4Neighbors
(int x, int y, Predicate<? super Object> predicate) int
count8Neighbors
(int x, int y, Predicate<? super Object> predicate) current()
void
debug
(PrintStream s) void
void
void
get
(int x, int y) get
(GridPosition position) int
getBooleanAsOneOrZero
(int x, int y, Predicate<? super Object> predicate) iterator()
double
laplacian_3x3
(int x, int y, double centerWeight, double adjacentWeight, double diagonalWeight) next()
void
void
void
void
void
void
void
void
set
(GridPosition position, Object value) void
setParentGrid
(Grid parentGrid) void
setUpdateOption
(GridLayer.GridLayerUpdateOption updateOption) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GridLayer
-
GridLayer
-
-
Method Details
-
setParentGrid
-
getLayerName
-
getParentGrid
-
current
-
next
-
getUpdateOption
-
setUpdateOption
-
persist
-
iterator
-
fill
-
fill
-
laplacian_3x3
public double laplacian_3x3(int x, int y, double centerWeight, double adjacentWeight, double diagonalWeight) -
set
-
set
-
clear
public void clear(int x, int y) -
clear
-
get
-
get
-
count8Neighbors
-
count4Neighbors
-
average9Neighbors
public double average9Neighbors(int x, int y) -
average8Neighbors
public double average8Neighbors(int x, int y) -
average4Neighbors
public double average4Neighbors(int x, int y) -
count
-
getBooleanAsOneOrZero
-
scatter
-
scatter
-
scatter
-
scatter
-
scatter
-
form
-
getRandomUnoccupiedPosition
-
debug
-