-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathabm_grid_torus.sthlp
67 lines (48 loc) · 1.87 KB
/
abm_grid_torus.sthlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{smcl}
{* *! version 0.1.0 29Mar2019 MLB}{...}
{vieweralsosee "help abm_grid" "help abm_grid"}{...}
{p2colset 1 12 14 2}{...}
{p2col:{bf:torus()} {hline 2}}return or set whether or not the grid wraps around
{p_end}
{p2colreset}{...}
{marker syntax}{...}
{title:Syntax}
{p 8 12 2}
{it:real scalar}
{cmd:torus()}
{p 8 12 2}
{it:void}{bind: }
{cmd:torus(}{it:real scalar bool}{cmd:)}
{marker description}{...}
{title:Description}
{p 4 4 2}
{cmd:torus()} returns whether the grid wraps around (1) - that is, that cells on
the left border of the grid neighbour opposite cells on the right border and
cells on the top border neighbour cells on the opposite bottom border - or not
(0). If this has not been set previously it returns {cmd:.}.
{p 4 4 2}
{cmd:torus(}{it:bool}{cmd:)} sets or resets whether the grid wraps around or
not. Set {it:bool} to 1 when the grid should wrap around and to 0 when the grid
should not wrap around. If this has not been set, then
{help abm_grid_setup:setup()} will set this to 0 (not wrap around).
{title:Remarks}
{pstd}
One thing to consider with a grid is what to do with the cells on the borders of
the grid. They can either have fewer neighbours, or we can say that the grid
wraps around so that cells of the left border neighbour cells on the right
border and cells on the top border neighbour cells on the bottom border. The
default is to let cells on the border have fewer neighbours.
{marker conformability}{...}
{title:Conformability}
{cmd:torus()}:
{it:result}: 1 {it:x} 1
{cmd:torus(}{it:bool}{cmd:)}:
{it:bool}: 1 {it:x} 1
{it:result}: {it:void}
{marker diagnostics}{...}
{title:Diagnostics}
{p 4 4 2}
{cmd:torus()} returns {cmd:.} if the wrapping behavior of the grid has not been
specified previously.
{p 4 4 2}
{cmd:torus(}{it:bool}{cmd:)} aborts with an error if {it:bool} is not 0 or 1.