The SimsStats class

For keeping track of various statistics arising during the runtime of the low index algorithm.

The purpose of this class is to collect some statistics related to Sims1 or Sims2.

See also

Sims1, Sims2

Contents

SimsStats

For keeping track of various statistics arising during the runtime of the low index algorithm.

SimsStats.copy(…)

Copy a SimsStats object.

SimsStats.count_last(…)

Get the number of congruences found at time of last report.

SimsStats.count_now(…)

Get number of congruences found up to this point.

SimsStats.init(…)

Overloaded function.

SimsStats.max_pending(…)

Get the maximum number of pending definitions.

SimsStats.stats_check_point(…)

Store the current statistic values.

SimsStats.stats_zero(…)

Set all statistics to zero.

SimsStats.total_pending_last(…)

Get the total number of pending definitions at time of last report.

SimsStats.total_pending_now(…)

Get the total number of pending definitions.

Full API

class SimsStats
__init__(self: SimsStats) None

Default constructor.

Constructs a SimsStats object with all statistics set to zero.

copy(self: SimsStats) SimsStats

Copy a SimsStats object.

This function returns a SimsStats object that is a copy of self. The state of the new SimsStats object is the same as self. This triggers an atomic load on the member variables of self.

Returns:

The copy.

Return type:

SimsStats

count_last(self: SimsStats) int

Get the number of congruences found at time of last report.

This function returns member holds the number of congruences found by the Sims1 or Sims2 algorithm at the time of the last call to stats_check_point().

Returns:

The number of congruences.

Return type:

int

count_now(self: SimsStats) int

Get number of congruences found up to this point.

This function returns the total number of congruences found during the running of the Sims1 or Sims2 algorithm.

Returns:

The number of congruences.

Return type:

int

See also

count_last()

init(*args, **kwargs)

Overloaded function.

init(self: SimsStats) SimsStats

Reinitialize an existing SimsStats object.

This function puts a SimsStats object back into the same state as if it had been newly default constructed.

Returns:

The first argument self.

Return type:

SimsStats

init(self: SimsStats, that: SimsStats) SimsStats

This function reinitializes the SimsStats object from that. The state of the new SimsStats object is the same as that. This triggers an atomic load on the member variables of that.

Parameters:

that (SimsStats) – the SimsStats to reinitialize from.

Returns:

The first argument self.

Return type:

SimsStats

max_pending(self: SimsStats) int

Get the maximum number of pending definitions.

A “pending definition” is just an edge that will be defined at some point in the future in the WordGraph represented by a Sims1 or Sims2 instance at any given moment. This function returns the maximum number of such pending definitions that occur during the running of the algorithms in Sims1 or Sims2.

Returns:

The maximum number of definitions.

Return type:

int

stats_check_point(self: SimsStats) SimsStats

Store the current statistic values.

This function overwrites the values of count_last() and total_pending_last() with count_now() and total_pending_now() respectively. Triggers an atomic load on count_now() and total_pending_now().

Returns:

The first argument self.

Return type:

SimsStats

stats_zero(self: SimsStats) SimsStats

Set all statistics to zero.

Returns:

The first argument self.

Return type:

SimsStats

total_pending_last(self: SimsStats) int

Get the total number of pending definitions at time of last report.

A “pending definition” is just an edge that will be defined at some point in the future in the WordGraph represented by a Sims1 or Sims2 instance at any given moment. This function returns the total number of pending definitions that occur at the time of the last call to stats_check_point(). This is the same as the number of nodes in the search tree encounter during the running of Sims1 or Sims2.

Returns:

The number of pending definitions.

Return type:

int

total_pending_now(self: SimsStats) int

Get the total number of pending definitions.

A “pending definition” is just an edge that will be defined at some point in the future in the WordGraph represented by a Sims1 or Sims2 instance at any given moment. This function returns the total number of pending definitions that occur during the running of the algorithms in Sims1 or Sims2. This is the same as the number of nodes in the search tree encounter during the running of Sims1 or Sims2.

Returns:

The number of pending definitions.

Return type:

int