View | Details | Raw Unified | Return to bug 660
Collapse All | Expand All

(-)a/src/core/random-variable.cc (-6 / +2 lines)
 Lines 778-800   private: Link Here 
778
  double m_bound;     // Bound on value's difference from the mean (absolute value)
778
  double m_bound;     // Bound on value's difference from the mean (absolute value)
779
  bool   m_nextValid; // True if next valid
779
  bool   m_nextValid; // True if next valid
780
  double m_next;      // The algorithm produces two values at a time
780
  double m_next;      // The algorithm produces two values at a time
781
  static bool   m_static_nextValid;
782
  static double m_static_next;
783
};
781
};
784
782
785
bool         NormalVariableImpl::m_static_nextValid = false;
786
double       NormalVariableImpl::m_static_next;
787
const double NormalVariableImpl::INFINITE_VALUE = 1e307;
783
const double NormalVariableImpl::INFINITE_VALUE = 1e307;
788
784
789
NormalVariableImpl::NormalVariableImpl() 
785
NormalVariableImpl::NormalVariableImpl() 
790
  : m_mean(0.0), m_variance(1.0), m_bound(INFINITE_VALUE), m_nextValid(false){}
786
  : m_mean(0.0), m_variance(1.0), m_bound(INFINITE_VALUE), m_nextValid(false){}
791
787
792
NormalVariableImpl::NormalVariableImpl(double m, double v, double b/*=INFINITE_VALUE*/)
788
NormalVariableImpl::NormalVariableImpl(double m, double v, double b)
793
  : m_mean(m), m_variance(v), m_bound(b), m_nextValid(false) { }
789
  : m_mean(m), m_variance(v), m_bound(b), m_nextValid(false) { }
794
790
795
NormalVariableImpl::NormalVariableImpl(const NormalVariableImpl& c)
791
NormalVariableImpl::NormalVariableImpl(const NormalVariableImpl& c)
796
  : RandomVariableBase(c), m_mean(c.m_mean), m_variance(c.m_variance),
792
  : RandomVariableBase(c), m_mean(c.m_mean), m_variance(c.m_variance),
797
    m_bound(c.m_bound) { }
793
    m_bound(c.m_bound), m_nextValid(false) { }
798
794
799
double NormalVariableImpl::GetValue()
795
double NormalVariableImpl::GetValue()
800
{
796
{

Return to bug 660