|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 13 example: Bak–Tang–Wiesenfeld self-organised criticality. More...
#include <array>#include <cstddef>#include <cstdint>#include <iostream>#include <stdexcept>#include <string>#include <ca-traits.H>#include <tpl_ca_async_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_storage.H>#include <tpl_ca_update_scheme.H>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Phase 13 example: Bak–Tang–Wiesenfeld self-organised criticality.
The classical sandpile is the textbook example of a CA whose dynamics need a sequential update — every visit to a cell relaxes it once, redistributing grains to its 4-neighbour cross. The example seeds the centre of a 16×16 grid with grains, then triggers an avalanche by dropping grains one at a time. After each drop we measure the avalanche size (number of cells that relaxed before the system stabilised); the empirical avalanche size distribution famously follows a power law, the hallmark of self-organised criticality (Bak, Tang & Wiesenfeld, 1987).
Run: ./ca_sandpile_example [drops] [side]
Definition in file ca_sandpile_example.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 116 of file ca_sandpile_example.cc.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), engine, and k.