mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
add new ema invariant (#7288)
This commit is contained in:
parent
374609bd46
commit
b0069010f8
|
@ -23,7 +23,7 @@ Revision History:
|
|||
class ema {
|
||||
double m_alpha, m_beta, m_value;
|
||||
unsigned m_period, m_wait;
|
||||
bool invariant() const { return 0 <= m_alpha && m_alpha <= m_beta && m_beta <= 1; }
|
||||
bool invariant() const { return 0 <= m_alpha && m_alpha <= m_beta && m_beta <= 1 && m_wait <= m_period; }
|
||||
public:
|
||||
ema(): m_alpha(0), m_beta(1), m_value(0), m_period(0), m_wait(0) {
|
||||
SASSERT(invariant());
|
||||
|
|
Loading…
Reference in a new issue