Typedef
Static Public Summary | ||
public |
Array coordinates to a pixel on the grid. |
|
public |
Rendering context of canvas. |
|
public |
An object where each cell on the grid has a key (its CellId), and the corresponding value at that key is an array with some values for that cell. |
|
public |
A unique identifier number of a cell on the grid. |
|
public |
Index specifying the 'kind' of cell we are dealing with. |
|
public |
An array of arrays containing interaction parameter values for each CellKind - combination. |
|
public |
An object where each cell on the grid has a key (its CellId), and the corresponding value at that key is single property of that cell. |
|
public |
An array with the grid size in pixels for each dimension. |
|
public |
Hex code string for a color. |
|
public |
Index coordinate to a pixel on the grid. |
|
public |
Parameter structure for parameters that should come in an array with an element for each CellKind including background. |
|
public |
Parameter structure for parameters that specify interactions between two cells with each a CellKind. |
|
public |
An object of class MersenneTwister. |
|
public |
An array containing parameter values for each CellKind. |
|
public |
An array containing parameter values for each CellKind. |
|
public |
An array containing parameter values for each CellKind. |
|
public |
An array containing parameter values for each CellKind. |
|
public |
A pixel on the grid. |
|
public |
SingleValue: number | string | boolean Parameter structure for parameters that should come as a single value. |
|
public |
Unique identifier of some element. |
|
public |
updatePixelFunction(p: ArrayCoordinate, neighbors: ArrayCoordinate[]): number: function Function that updates a gridpoint depending on its current value and that of its neighbors. |
Static Public
public ArrayCoordinate: number[] source
Array coordinates to a pixel on the grid.
We generally use two types of coordinates. An ArrayCoordinate contains the 'regular' [x,y] or [x,y,z] pointer to a position on the grid, which is intuitive to use.
However, for speed, models of class GridBasedModel often use a different type of coordinates called IndexCoordinate. See methods p2i and i2p of the appropriate grid subclass for conversions between the two.
public CellArrayObject: object source
An object where each cell on the grid has a key (its CellId), and the corresponding value at that key is an array with some values for that cell. These arrays do not have to be of the same length.
public CellId: number source
A unique identifier number of a cell on the grid. In classic CPM language, this is often referred to as 'type', but we use cellid to prevent confusion with the biological meaning of 'celltype' (which we call CellKind to prevent confusion).
The cellid must be a positive integer. The number 0 is reserved for the background.
public CellKind: number source
Index specifying the 'kind' of cell we are dealing with. This corresponds to the biological idea of a 'celltype'; so the CPM parameters used depend on the cellkind. Convention is that we store CPM parameters in number arrays param = number[], where param[i] is the parameter value for cellkind i.
This way, we can have multiple cells (each with their own CellId) of the same "cellkind", that get the same parameters (e.g. the same target volume). But we can also have multiple cellkinds on the grid, e.g. a small and a large cellkind.
The cellkind must be a positive integer. The number 0 is reserved for the background.
public CellKindInteractionMatrix: number[] source
An array of arrays containing interaction parameter values for each CellKind - combination. Each element in the array is a non-negative number, and X[n][m] contains the value for an interaction between cellkinds n and m.
Example:
// J[0][0] between two background pixels is always zero.
// Not that it matters, because the background has a
// single cellid of zero -- so there are no pairs
// of background pixels from different cells anyway.
let J = [[0,20],[20,10]]
public CellObject: object source
An object where each cell on the grid has a key (its CellId), and the corresponding value at that key is single property of that cell.
public GridSize: number[] source
An array with the grid size in pixels for each dimension. Each element must be a positive integer. For example, for GridSize array g, g[0] is the size in x-dimension, g[1] in y, etc.
public IndexCoordinate: number source
Index coordinate to a pixel on the grid.
We generally use two types of coordinates. An ArrayCoordinate contains the 'regular' [x,y] or [x,y,z] pointer to a position on the grid, which is intuitive to use.
However, for speed, models of class GridBasedModel often use a different type of coordinates called IndexCoordinate, which is a non-negative integer number. See methods p2i and i2p of the appropriate grid subclass for conversions between the two.
public KindArray: Array source
Parameter structure for parameters that should come in an array with an element for each CellKind including background.
Example:
let V = [0,5] // Is a KindArray parameter
public KindMatrix: Array source
Parameter structure for parameters that specify interactions between two cells with each a CellKind. Should be an array of arrays ("matrix") where each array has an element for each cellkind including background. Thus, M[n][m] specifies the parameter for an interaction between a cell of cellkind n and a cell of cellkind m.
Example:
let J = [[0,20],[20,10]] // is a KindMatrix parameter.
public PerKindArray: number[] source
An array containing parameter values for each CellKind. Each element in the array is an array of some length, and the array for CellKind k is stored in array[k].
Example:
let LAMBDA_ACT_MBG = [[0,0],[0,0],[800,100]]
public PerKindBoolean: boolean[] source
An array containing parameter values for each CellKind. Each element in the array is a boolean, and the value for CellKind k is stored in array[k].
Example:
// IS_BARRIER[0] is for the background; cellkind 1 is the "barrier"
// and 2 is a real cell.
let IS_BARRIER = [false,true,false]
public PerKindNonNegative: number[] source
An array containing parameter values for each CellKind. Each element in the array is a non-negative number, and the value for CellKind k is stored in array[k].
Example:
// V[0] is for the background, V[1] for the first real cellkind.
let V = [0,500]
public PerKindProb: number[] source
An array containing parameter values for each CellKind. Each element in the array is a number between 0 and 1, and the value for CellKind k is stored in array[k].
Example:
// PERSIST[0] is for the background
// PERSIST[1] for the first real cellkind.
let PERSIST = [0,0.8]
public Pixel: Object[] source
A pixel on the grid.
Properties:
Name | Type | Attribute | Description |
Pixel[0] | ArrayCoordinate | pixel coordinate |
|
Pixel[1] | number | pixel value |
public SingleValue: number | string | boolean source
Parameter structure for parameters that should come as a single value. This value can be of type string, boolean, or number.
Example:
let ACT_MEAN = "arithmetic" // Is a SingleValue parameter
public uniqueID: number | string source
Unique identifier of some element. This can be a number (integer) or a string, but it must uniquely identify one element in a set.
public updatePixelFunction(p: ArrayCoordinate, neighbors: ArrayCoordinate[]): number: function source
Function that updates a gridpoint depending on its current value and that of its neighbors.
Params:
Name | Type | Attribute | Description |
p | ArrayCoordinate | pixel to update |
|
neighbors | ArrayCoordinate[] | coordinates of neighbors of p |