Package org.baseagent.grid
Class GridLayer
java.lang.Object
org.baseagent.grid.GridLayer
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGridLayer(String layerName, Grid parentGrid, GridLayer.GridLayerUpdateOption updateOption) GridLayer(Grid parentGrid, GridLayer.GridLayerUpdateOption updateOption) -
Method Summary
Modifier and TypeMethodDescriptiondoubleaverage4Neighbors(int x, int y) doubleaverage8Neighbors(int x, int y) doubleaverage9Neighbors(int x, int y) voidclear(int x, int y) voidclear(GridPosition position) longintcount4Neighbors(int x, int y, Predicate<? super Object> predicate) intcount8Neighbors(int x, int y, Predicate<? super Object> predicate) current()voiddebug(PrintStream s) voidvoidvoidget(int x, int y) get(GridPosition position) intgetBooleanAsOneOrZero(int x, int y, Predicate<? super Object> predicate) iterator()doublelaplacian_3x3(int x, int y, double centerWeight, double adjacentWeight, double diagonalWeight) next()voidvoidvoidvoidvoidvoidvoidvoidset(GridPosition position, Object value) voidsetParentGrid(Grid parentGrid) voidsetUpdateOption(GridLayer.GridLayerUpdateOption updateOption) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-