|
ADS
Algorithms and Data Structures
|
the default recompute policy: from scratch when the net events exceed \( \rho \) times the size, a repair abandoned when its work exceeds \( \alpha \) times that of a computation from scratch or when an element is extracted again more than \( \beta \) times; the values that are not exact (floating point) summed again after \( \mathit{period} \) times the size of changes, by the compensated sum of Neumaier when asked More...
#include <ADS/Modification.h>
Public member functions | |
| bool | scratch (const ReoptStats &s) const |
| whether to compute from scratch: \( e > \rho \max( n , 1 ) \), with \( e \) and \( n \) the events and the size of \( s \), and at the close of a batch only if early | |
| bool | abandon (const ReoptStats &s, double w) const |
| whether to abandon the repair after the work \( w \): \( w > \alpha \) times the work of a scratch, or more than \( \beta > 0 \) reinsertions of one element | |
| void | record (int, double) const |
| nothing: this policy keeps no history | |
| bool | refresh (std::size_t c, std::size_t n) const |
| whether the values that are not exact are to be summed again after \( c \) changes of an instance of size \( n \): \( c \ge \mathit{period} \max( n , 1 ) \) | |
Public attributes | |
| double | rho = 0.25 |
| the ratio of the events to the size | |
| double | alpha = 0.5 |
| the ratio of the work to a scratch | |
| int | beta = 0 |
| the reinsertions of one element, 0 off | |
| bool | early = false |
| whether scratch() acts at the close of | |
| double | period = 1 |
| the changes between two sums, in units | |
| bool | compensated = false |
| whether the sums are compensated | |
the default recompute policy: from scratch when the net events exceed \( \rho \) times the size, a repair abandoned when its work exceeds \( \alpha \) times that of a computation from scratch or when an element is extracted again more than \( \beta \) times; the values that are not exact (floating point) summed again after \( \mathit{period} \) times the size of changes, by the compensated sum of Neumaier when asked
|
inlinenodiscard |
whether to abandon the repair after the work \( w \): \( w > \alpha \) times the work of a scratch, or more than \( \beta > 0 \) reinsertions of one element
|
inline |
nothing: this policy keeps no history
|
inlinenodiscard |
whether the values that are not exact are to be summed again after \( c \) changes of an instance of size \( n \): \( c \ge \mathit{period} \max( n , 1 ) \)
|
inlinenodiscard |
whether to compute from scratch: \( e > \rho \max( n , 1 ) \), with \( e \) and \( n \) the events and the size of \( s \), and at the close of a batch only if early
| double ADS::RatioPolicy::alpha = 0.5 |
the ratio of the work to a scratch
| int ADS::RatioPolicy::beta = 0 |
the reinsertions of one element, 0 off
| bool ADS::RatioPolicy::compensated = false |
whether the sums are compensated
| bool ADS::RatioPolicy::early = false |
whether scratch() acts at the close of
a batch, which then sends Rebuilt
| double ADS::RatioPolicy::period = 1 |
the changes between two sums, in units
of the size, 0 never
| double ADS::RatioPolicy::rho = 0.25 |
the ratio of the events to the size