npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0

#include <CopulaInterpolationND.hh>

Inheritance diagram for npstat::CopulaInterpolationND:
npstat::AbsInterpolationAlgoND npstat::AbsDistributionND

Public Member Functions

 CopulaInterpolationND (unsigned dim, unsigned nInterpolated)
 
virtual CopulaInterpolationNDclone () const
 
bool mappedByQuantiles () const
 
void add (const AbsDistributionND &d, double weight)
 
void replace (unsigned i, const AbsDistributionND &d, double weight)
 
void setWeight (unsigned i, double weight)
 
void clear ()
 
void normalizeAutomatically (bool allow)
 
unsigned size () const
 
double density (const double *x, unsigned dim) const
 
void unitMap (const double *rnd, unsigned dim, double *x) const
 
double copulaDensity (const double *x, unsigned dim) const
 
double productOfTheMarginals (const double *x, unsigned dim) const
 
double marginalDensity (unsigned idim, double x) const
 
double marginalCdf (unsigned idim, double x) const
 
double marginalExceedance (unsigned idim, double x) const
 
double marginalQuantile (unsigned idim, double x) const
 
virtual gs::ClassId classId () const
 
- Public Member Functions inherited from npstat::AbsInterpolationAlgoND
 AbsInterpolationAlgoND (const unsigned dim)
 
- Public Member Functions inherited from npstat::AbsDistributionND
 AbsDistributionND (const unsigned dim)
 
 AbsDistributionND (const AbsDistributionND &r)
 
AbsDistributionNDoperator= (const AbsDistributionND &r)
 
bool operator== (const AbsDistributionND &r) const
 
bool operator!= (const AbsDistributionND &r) const
 
unsigned dim () const
 
virtual unsigned random (AbsRandomGenerator &g, double *x, unsigned lenX) const
 
virtual bool write (std::ostream &) const
 

Static Public Member Functions

static const char * classname ()
 
static unsigned version ()
 
- Static Public Member Functions inherited from npstat::AbsDistributionND
static const char * classname ()
 
static unsigned version ()
 
static AbsDistributionNDread (const gs::ClassId &id, std::istream &)
 

Protected Member Functions

virtual bool isEqual (const AbsDistributionND &) const
 

Additional Inherited Members

- Protected Attributes inherited from npstat::AbsDistributionND
const unsigned dim_
 

Detailed Description

This class interpolates multivariate statistical distributions decomposed into copula and marginals. Interpolation weights are to be calculated outside of this class.

Constructor & Destructor Documentation

◆ CopulaInterpolationND()

npstat::CopulaInterpolationND::CopulaInterpolationND ( unsigned  dim,
unsigned  nInterpolated 
)

Constructor arguments are the dimensionality of the density and the number of terms in the weighted sum which represents the interpolated density. The terms are added to the sum later, by calling "add" or "replace" methods. At least "nInterpolated" distributions must be added by the "add" method before calling the "density" method.

Member Function Documentation

◆ add()

void npstat::CopulaInterpolationND::add ( const AbsDistributionND d,
double  weight 
)
virtual

In this method, "d" must refer to a CompositeDistributionND object

Implements npstat::AbsInterpolationAlgoND.

◆ classId()

virtual gs::ClassId npstat::CopulaInterpolationND::classId ( ) const
inlinevirtual

Method needed for "geners" I/O

Implements npstat::AbsDistributionND.

◆ clear()

void npstat::CopulaInterpolationND::clear ( )
virtual

Clear all the terms in the weighted sum

Implements npstat::AbsInterpolationAlgoND.

◆ clone()

virtual CopulaInterpolationND* npstat::CopulaInterpolationND::clone ( ) const
inlinevirtual

"Virtual copy constructor"

Implements npstat::AbsInterpolationAlgoND.

◆ copulaDensity()

double npstat::CopulaInterpolationND::copulaDensity ( const double *  x,
unsigned  dim 
) const

Interpolate the copula density

◆ density()

double npstat::CopulaInterpolationND::density ( const double *  x,
unsigned  dim 
) const
virtual

Interpolate the complete multivariate distribution

Implements npstat::AbsDistributionND.

◆ mappedByQuantiles()

bool npstat::CopulaInterpolationND::mappedByQuantiles ( ) const
inlinevirtual

The following method should return "true" in case the "unitMap" method is implemented by a sequence of conditional quantile functions. Distributions with such maps permit quantile-based interpolation procedures.

Implements npstat::AbsDistributionND.

◆ marginalDensity()

double npstat::CopulaInterpolationND::marginalDensity ( unsigned  idim,
double  x 
) const

Interpolate the marginal distribution for dimension "idim"

◆ normalizeAutomatically()

void npstat::CopulaInterpolationND::normalizeAutomatically ( bool  allow)
virtual

This method should be called to disable (and later enable) automatic weight normalization if you want to use the "setWeight" or "replace" methods many times and, especially, if at some point in this process the sum of the weights becomes zero. The "density" and "unitMap" methods can not be called if normalization is not enabled.

Implements npstat::AbsInterpolationAlgoND.

◆ productOfTheMarginals()

double npstat::CopulaInterpolationND::productOfTheMarginals ( const double *  x,
unsigned  dim 
) const

Interpolate the product of the marginals

◆ setWeight()

void npstat::CopulaInterpolationND::setWeight ( unsigned  i,
double  weight 
)
virtual

Set the weight for the given term in the weighted sum

Implements npstat::AbsInterpolationAlgoND.

◆ size()

unsigned npstat::CopulaInterpolationND::size ( ) const
inlinevirtual

The number of terms in the weighted sum

Implements npstat::AbsInterpolationAlgoND.

◆ unitMap()

void npstat::CopulaInterpolationND::unitMap ( const double *  rnd,
unsigned  bufLen,
double *  x 
) const
virtual

Mapping from the unit hypercube into the density support region. Note that "bufLen" does not have to be equal to the dimensionality of the function. There may be an efficient way to generate just the leading dimensions in case "bufLen" is smaller than the dimensionality.

Implements npstat::AbsDistributionND.


The documentation for this class was generated from the following file: