28#include <ql/errors.hpp>
29#include <ql/instruments/payoffs.hpp>
69 virtual Size
size()
const;
70 virtual vector<Distributionpair>
get()
const;
75 Real
data(Size i)
const;
192 vector<Distributionpair> x1pm1 = a.
get();
193 vector<Distributionpair> func;
195 for (Size i = 0; i < x1pm1.size(); i++) {
DiscreteDistribution()
Default constructor with probability 1.0 at 0.0.
virtual vector< Distributionpair > get() const
Real data(Size i) const
Return data at index i.
virtual ~DiscreteDistribution()
Real probability(Size i) const
Return probability for data at index i.
vector< Distributionpair > data_
virtual Size size() const
Distributionpair is a helper class for DiscretDistribution.
Distributionpair(Real x=0, Real y=0)
Modify Distrete Distribution.
static DiscreteDistribution scalarshiftx(const DiscreteDistribution &a, const Real &b)
static DiscreteDistribution scalarmultprob(const DiscreteDistribution &a, const Real &b)
static DiscreteDistribution scalarmultx(const DiscreteDistribution &a, const Real &b)
static DiscreteDistribution splicemezz(const DiscreteDistribution &a, const DiscreteDistribution &b, Real c)
static DiscreteDistribution functionmax(const DiscreteDistribution &a, const Real &b)
static DiscreteDistribution sum(const DiscreteDistribution &a, const DiscreteDistribution &b, Size buckets)
static DiscreteDistribution sumspecialunsorted(const DiscreteDistribution &a, const DiscreteDistribution &b, Real c)
static DiscreteDistribution function(F &, const DiscreteDistribution &a)
static DiscreteDistribution rebucketfixedstep(const DiscreteDistribution &a, Real step)
static Real probabilitymatch(const DiscreteDistribution &a, const DiscreteDistribution &b, Real c, bool forward)
static DiscreteDistribution sumspecialright(const DiscreteDistribution &a, const DiscreteDistribution &b, Real c)
static Real expectation(const DiscreteDistribution &a)
static Real stdev(const DiscreteDistribution &a)
static DiscreteDistribution rebucketfixednumber(const DiscreteDistribution &a, Size buckets)
static DiscreteDistribution functionmin(const DiscreteDistribution &a, const Real &b)
static DiscreteDistribution sumspecial(const DiscreteDistribution &a, const DiscreteDistribution &b, Real c)
static Real leftstdev(const DiscreteDistribution &a)
static DiscreteDistribution convolve(const DiscreteDistribution &a, const DiscreteDistribution &b, Size buckets)
static Real print(const DiscreteDistribution &a, const ostringstream &o)
bool operator<(const Dividend &d1, const Dividend &d2)
bool operator>(const Currency &, const Currency &)