|
| AvalancheSegmenter (const std::array< size_t, Dim > &shape, const array_type::tensor< size_t, 1 > &idx, const array_type::tensor< double, 1 > &t) |
|
size_t | nlabels () |
| Current number of labels (including the background).
|
|
void | prune () |
| Prune: renumber labels to lowest possible label, see also AvalancheSegmenter::nlabels.
|
|
void | change_labels (const array_type::tensor< size_t, 1 > &new_label) |
| Apply renumbering.
|
|
void | reorder (const array_type::tensor< ptrdiff_t, 1 > &labels) |
| Reorder the labels.
|
|
void | advance (size_t n=1) |
| Advance n yielding events.
|
|
void | advance_to (double t, bool floor=false) |
| Advance to the yielding events closest to a time t .
|
|
std::string | repr () const |
| Basic class info.
|
|
const auto & | shape () const |
| Shape of AvalancheSegmenter::s and AvalancheSegmenter::labels.
|
|
auto | size () const |
| Size of AvalancheSegmenter::s and AvalancheSegmenter::labels (== prod(shape) ).
|
|
const auto & | s () const |
| Per block, how many times it has yielded.
|
|
const auto & | labels () const |
| Per block, the label (0 for background).
|
|
size_t | nstep () |
| Number of yielding events taken into account.
|
|
auto | t () const |
| Time of each entry in m_idx .
|
|
template<size_t Dimension>
class GooseEPM::AvalancheSegmenter< Dimension >
Segment event in spatially correlated avalanches.
- Template Parameters
-
Dimension | Dimensionality of the system. |
A sequence of yielding blocks and their times is given. Event-per-event the number of times each block has yielded is updated (AvalancheSegmenter::s), and it is determined if the 'failing' block is connected to a previously failed cluster. Depending on the number of clusters it is connected to:
- 0: A new label is created.
- 1: The block is added to the cluster (is assigned the label of that cluster).
- > 2: The block and all connected clusters are labeled using the lowest of all labels. The labels of the merged clusters are not reused until AvalancheSegmenter::prune is called.
Note that:
Definition at line 2136 of file System.h.