|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswarm.BaseImpl
swarm.objectbase.SwarmObjectImpl
MemoryMatrix
public class MemoryMatrix
The class of the memory matrixes (layered) used by the computational objects included in recipes
Field Summary | |
---|---|
int |
currentLayer
layer to be used |
float[][] |
matrix
the memory matrix |
swarm.collections.ArrayImpl |
matrixArray
the array of matrixes built one for each layer, if layers are > 1 and sensitive==true |
int |
memoryMatrixNumber
the number identifying the memory matrix (starting from zero) this number represents also the posizione of this memory matrix in an array of memory matrixes created and managed by ESFrameModelSwarm |
int |
numberOfCols
the numberOfCols of matrix |
int |
numberOfRows
the numberOfRows of matrix |
int |
numberOfUnitsUsingThisMemoryMatrix
to be used in case of a unit memory matrix: number of units using this memory matrix |
boolean |
printMatrixes
print matrix option |
boolean |
sensitive
is the unit sensitive to layers? |
float[][] |
shadowMatrix
the shadow memory matrix |
swarm.collections.ArrayImpl |
shadowMatrixArray
the array of shadow matrixes built one for each layer, if layers are > 1 and sensitive==true |
int |
totalLayerNumber
the number of layers in the simulation |
Constructor Summary | |
---|---|
MemoryMatrix(swarm.defobj.Zone aZone,
int n,
boolean s,
int tln,
int nor,
int noc,
boolean pm)
the constructor for MemoryMatrix |
Method Summary | |
---|---|
void |
decreaseNumberOfUnitsUsingThisMemoryMatrix()
setting the number of units using this memory matrix (--) |
void |
drop()
dropping a memory matrix |
boolean |
getEmpty(int layer,
int row,
int col)
checking if a position in a matrix is empty |
int |
getMemoryMatrixNumber()
returning the number of the matrix |
int |
getNumberOfCols()
returning the number of cols |
int |
getNumberOfRows()
returning the number of rows |
int |
getNumberOfUnitsUsingThisMemoryMatrix()
getting the number of units using this memory matrix |
float |
getValue(int layer,
int row,
int col)
getting a value |
void |
increaseNumberOfUnitsUsingThisMemoryMatrix()
setting the number of units using this memory matrix (++) |
void |
init(swarm.defobj.Zone aZone,
int n,
boolean s,
int tln,
int nor,
int noc,
boolean pm)
managing the constructor content |
void |
print()
printing the matrix on the current terminal |
void |
printDirectly()
printing the matrix on the current terminal regardless to the value of printMatrixes |
void |
setEmpty(int layer,
int row,
int col)
setting a position in a matrix as empty |
void |
setValue(int layer,
int row,
int col,
double value)
setting a value (double) |
void |
setValue(int layer,
int row,
int col,
float value)
setting a value (float) |
Methods inherited from class swarm.objectbase.SwarmObjectImpl |
---|
compare, describe, describeID, getCompleteProbeMap, getDisplayName, getName, getProbeForMessage, getProbeForVariable, getProbeMap, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int memoryMatrixNumber
public int totalLayerNumber
public int currentLayer
public boolean sensitive
public swarm.collections.ArrayImpl matrixArray
public float[][] matrix
public swarm.collections.ArrayImpl shadowMatrixArray
public float[][] shadowMatrix
public int numberOfRows
public int numberOfCols
public boolean printMatrixes
public int numberOfUnitsUsingThisMemoryMatrix
Constructor Detail |
---|
public MemoryMatrix(swarm.defobj.Zone aZone, int n, boolean s, int tln, int nor, int noc, boolean pm)
Method Detail |
---|
public void init(swarm.defobj.Zone aZone, int n, boolean s, int tln, int nor, int noc, boolean pm)
public void setValue(int layer, int row, int col, float value)
public void setValue(int layer, int row, int col, double value)
public float getValue(int layer, int row, int col)
public boolean getEmpty(int layer, int row, int col)
public void setEmpty(int layer, int row, int col)
public void print()
public void printDirectly()
public int getNumberOfRows()
public int getNumberOfCols()
public int getMemoryMatrixNumber()
public void increaseNumberOfUnitsUsingThisMemoryMatrix()
public void decreaseNumberOfUnitsUsingThisMemoryMatrix()
public int getNumberOfUnitsUsingThisMemoryMatrix()
public void drop()
drop
in interface swarm.defobj.Drop
drop
in class swarm.objectbase.SwarmObjectImpl
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |