3 #include "NormalDist.h"
4 namespace Multivariate{
43 unsigned int DegreesOfFreedom;
46 Eigen::VectorXd LocatVect;
47 Eigen::MatrixXd ScaleMatrix;
50 boost::math::tuple<double, double> operator()(
double x);
52 unsigned int NumSimul;
53 std::pair<double,double> ComputeThat(
unsigned int N)
const;
74 tDistribution(
unsigned int Dimension,
unsigned int DegFreedom,
const Eigen::VectorXd& locVect,
const Eigen::MatrixXd& ScaleMatr);
85 tDistribution(
unsigned int Dimension=1U,
unsigned int DegFreedom=1U);
97 bool SetLocationVector(
const Eigen::VectorXd& mVect){
if(mVect.rows()!=Dim)
return false; LocatVect=mVect; CheckValidity();
return true;}
153 bool SetScaleMatrix(
const std::vector<double>& mVect,
bool RowWise=
true);
211 double GetDensity(
const Eigen::VectorXd& Coordinates)
const;
255 template <
class F,
class T>
friend T boost::math::tools::newton_raphson_iterate(F f, T guess, T min, T max,
int digits);
256 template <
class F,
class T>
friend T boost::math::tools::newton_raphson_iterate(F f, T guess, T min, T max,
int digits, boost::uintmax_t& max_iter);
257 template <
class F,
class T>
friend void boost::math::tools::detail::handle_zero_derivative(F f,T& last_f0,
const T& f0,T& delta,T& result,T& guess,
const T& min,
const T& max);
const Eigen::MatrixXd & GetScaleMatrix() const
Get the scale matrix of the distribution.
Definition: tDist.h:176
bool SetDegreesOfFreedom(unsigned int a)
Set the degrees of freedom of the distribution.
Definition: tDist.cpp:128
bool SetLocationVector(const Eigen::VectorXd &mVect)
Set the expected values vector.
Definition: tDist.h:97
unsigned int GetDegreesOfFreedom() const
Get the degrees of freedom of the distribution.
Definition: tDist.h:182
Distributions base class.
Definition: AbstractDistribution.h:28
Eigen::MatrixXd GetVarMatrix() const
Computes the variance matrix of the distribution.
Definition: tDist.cpp:147
const Eigen::VectorXd & GetLocationVector() const
Get the location vector of the distribution.
Definition: tDist.h:170
Eigen::MatrixXd ExtractSamplesCDF(unsigned int NumSamples) const
Extracts samples from the distribution and returns their marginal CDF.
Definition: tDist.cpp:136
bool SetScaleMatrix(const Eigen::MatrixXd &SclMatr)
Set the scale matrix of the distribution.
Definition: tDist.cpp:208
virtual double GetCumulativeDesity(const Eigen::VectorXd &Coordinates) const =0
Computes the cumulative density function of the distribution in correspondence of the supplied coordi...
virtual double GetDensity(const Eigen::VectorXd &Coordinates) const =0
Computes the probability density function of the distribution in correspondence of the supplied coord...
double GetCumulativeDesity(const Eigen::VectorXd &Coordinates) const
Computes the cumulative density function of the distribution in correspondence of the supplied coordi...
Definition: tDist.cpp:8
Eigen::VectorXd GetQuantile(double Prob) const
Computes the inverse cumulative density function of the distribution in correspondence of the supplie...
Definition: tDist.cpp:236
bool SetDimension(unsigned int Dimension)
Set the dimensionality of the distribution.
Definition: tDist.cpp:195
double GetDensity(const Eigen::VectorXd &Coordinates) const
Computes the probability density function of the distribution in correspondence of the supplied coord...
Definition: tDist.cpp:42
Multivariate Student's t Distribution
Definition: tDist.h:41
Eigen::MatrixXd ExtractSamples(unsigned int NumSamples) const
Generates multiple simulations from the distribution.
Definition: tDist.cpp:26