mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
Plots are still rendered in float but computations are now in double Change-Id: I7e0a38effb780861b1443ee92a097cd319de3bc8
28 lines
628 B
C++
28 lines
628 B
C++
#ifndef PROBABILITE_ONE_PARAMETER_DISTRIBUTION_H
|
|
#define PROBABILITE_ONE_PARAMETER_DISTRIBUTION_H
|
|
|
|
#include "distribution.h"
|
|
#include <assert.h>
|
|
|
|
namespace Probability {
|
|
|
|
class OneParameterDistribution : public Distribution {
|
|
public:
|
|
OneParameterDistribution(float parameterValue) : m_parameter1(parameterValue) {}
|
|
int numberOfParameter() override { return 1; }
|
|
double parameterValueAtIndex(int index) override {
|
|
assert(index == 0);
|
|
return m_parameter1;
|
|
}
|
|
void setParameterAtIndex(float f, int index) override {
|
|
assert(index == 0);
|
|
m_parameter1 = f;
|
|
}
|
|
protected:
|
|
double m_parameter1;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|