zasim.cagen.stats - Statistics gatherers

Inheritance diagram of zasim.cagen.stats

class zasim.cagen.stats.SimpleHistogram[source]

Bases: zasim.cagen.bases.ExtraStats

Adding this class to the extra code list of a StepFunc will give access to a new array in the target called “histogram”. This value will count the amount of cells with the value used as its index.

provides_features = ['histogram']
visit()[source]
regenerate_histogram()[source]
new_config()[source]

Create a starting histogram.

init_once()[source]

Set up the histogram attributes.

build_name(parts)[source]
class zasim.cagen.stats.ActivityRecord[source]

Bases: zasim.cagen.bases.ExtraStats

Adding this class to the extra code list of a StepFunc will create a property called “activity” on the target. It is a two-cell array with the value of how many fields have changed their state in the last step and how many did not.

A value of -1 stands for “no data”.

Additionally, the local variable was_active is available after post_compute.

provides_features = ['activity']
visit()[source]
new_config()[source]

Reset the activity counter to -1, which stands for “no data”.

init_once()[source]

Set up the activity attributes.

build_name(parts)[source]

Previous topic

zasim.cagen.dualrule - Using two elementary rules at once

Next topic

zasim.cagen.nondeterministic - Nondeterministic step function execution

This Page