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
.
Contents
For keeping track of various statistics arising during the runtime of the low index algorithm. |
|
Copy a |
|
Get the number of congruences found at time of last report. |
|
Get number of congruences found up to this point. |
|
Overloaded function. |
|
Get the maximum number of pending definitions. |
|
Store the current statistic values. |
|
Set all statistics to zero. |
|
Get the total number of pending definitions at time of last report. |
|
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 newSimsStats
object is the same as self. This triggers an atomic load on the member variables of self.- Returns:
The copy.
- Return type:
- 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
orSims2
algorithm at the time of the last call tostats_check_point()
.- Returns:
The number of congruences.
- Return type:
See also
- 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
orSims2
algorithm.- Returns:
The number of congruences.
- Return type:
See also
- 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:
- 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 aSims1
orSims2
instance at any given moment. This function returns the maximum number of such pending definitions that occur during the running of the algorithms inSims1
orSims2
.- Returns:
The maximum number of definitions.
- Return type:
- stats_check_point(self: SimsStats) SimsStats
Store the current statistic values.
This function overwrites the values of
count_last()
andtotal_pending_last()
withcount_now()
andtotal_pending_now()
respectively. Triggers an atomic load oncount_now()
andtotal_pending_now()
.- Returns:
The first argument self.
- Return type:
- stats_zero(self: SimsStats) SimsStats
Set all statistics to zero.
- Returns:
The first argument self.
- Return type:
- 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 aSims1
orSims2
instance at any given moment. This function returns the total number of pending definitions that occur at the time of the last call tostats_check_point()
. This is the same as the number of nodes in the search tree encounter during the running ofSims1
orSims2
.- Returns:
The number of pending definitions.
- Return type:
See also
- 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 aSims1
orSims2
instance at any given moment. This function returns the total number of pending definitions that occur during the running of the algorithms inSims1
orSims2
. This is the same as the number of nodes in the search tree encounter during the running ofSims1
orSims2
.- Returns:
The number of pending definitions.
- Return type:
See also