move ValueCDF class to private class member

This commit is contained in:
Mathieu Lacage committed 2007-03-29 16:35:34 +02:00
1 parent 467b3d3161
commit 55d3a13b59
2 files changed
+11 -14

No files matched your search

+3 -3
View File
@@ -445,11 +445,11 @@ RandomVariable* NormalVariable::Copy() const
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// ValueCDF methods
ValueCDF::ValueCDF()
EmpiricalVariable::ValueCDF::ValueCDF()
: value(0.0), cdf(0.0){ }
ValueCDF::ValueCDF(double v, double c)
EmpiricalVariable::ValueCDF::ValueCDF(double v, double c)
: value(v), cdf(c) { }
ValueCDF::ValueCDF(const ValueCDF& c)
EmpiricalVariable::ValueCDF::ValueCDF(const ValueCDF& c)
: value(c.value), cdf(c.cdf) { }
//-----------------------------------------------------------------------------
+8 -11
View File
@@ -534,17 +534,6 @@ private:
double m_next; // The algorithm produces two values at a time
};
// Value/CDF pair class for Emiprical Distributions
//Doc:ClassXRef
class ValueCDF {
public:
ValueCDF();
ValueCDF(double v, double c);
ValueCDF(const ValueCDF& c);
double value;
double cdf;
};
/**
* \brief EmpiricalVariable distribution random var
* \ingroup randomvariable
@@ -580,6 +569,14 @@ public:
virtual void CDF(double v, double c); // Value, prob <= Value
private:
class ValueCDF {
public:
ValueCDF();
ValueCDF(double v, double c);
ValueCDF(const ValueCDF& c);
double value;
double cdf;
};
virtual void Validate(); // Insure non-decreasing emiprical values
virtual double Interpolate(double, double, double, double, double);
bool validated; // True if non-decreasing validated