Methods#
neighbors(patch) → {AgentList}#
Return the 8 patch "Moore" neighbors of the given patch. Will be less than 8 on the edge of the patches
Name | Type | Description |
---|---|---|
patch | Patch | a Patch instance |
- Source
An array of the neighboring patches
- Type:
- AgentList
neighbors4(patch) → {AgentList}#
Return the 4 patch "Van Neumann" neighbors of the given patch. Will be less than 4 on the edge of the patches
Name | Type | Description |
---|---|---|
patch | Patch | a Patch instance |
- Source
An array of the neighboring patches
- Type:
- AgentList
importDataSet(dataSet, property, useNearestopt)#
Assign a DataSet's values into the patches as the given property name
- Source
exportDataSet(property, Typeopt) → {DataSet}#
Extract a property from each Patch as a DataSet
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
property | string | The patch numeric property to extract | ||
Type | Type | <optional> | Array | The DataSet array's type |
- Source
A DataSet of the patche's values
- Type:
- DataSet
patchIndex(x, y) → {number}#
Return index into Patches given valid x,y integers
Name | Type | Description |
---|---|---|
x | number | Integer X value |
y | number | Integer Y value |
- Source
Integer index into Patches array
- Type:
- number