Coverage Control Library
Loading...
Searching...
No Matches
BivariateNormalDistribution Class Reference

Class for Bivariate Normal Distribution. More...

#include <bivariate_normal_distribution.h>

Public Member Functions

 BivariateNormalDistribution ()
 Default constructor.
 
 BivariateNormalDistribution (Point2 const &mean, double const &sigma, double const scale=1)
 Constructor for standard distribution.
 
 BivariateNormalDistribution (Point2 const &mean, Point2 const &sigma, double const rho, double const scale=1)
 Constructor for general distribution.
 
Point2 GetMean () const
 Returns the mean of the distribution.
 
Point2 GetSigma () const
 Returns the standard deviation of the distribution.
 
double GetRho () const
 Returns the correlation coefficient of the distribution.
 
double GetScale () const
 Returns the scale of the distribution.
 
Point2 TransformPoint (Point2 const &in_point) const
 Transforms a point from general distribution to standard distribution.
 
Point2f TransformPoint (Point2f const &in_point_f) const
 
double IntegrateQuarterPlane (Point2 const &point) const
 Integrates the distribution over a quarter plane The function integrates the distribution over a quarter plane, i.e. \(x > point.x()\) and \(y > point.y()\).
 
float IntegrateQuarterPlane (Point2f const &point) const
 

Detailed Description

Class for Bivariate Normal Distribution.

The class is used to represent a bivariate normal distribution. The distribution can be in its general form or a standard form. The standard form is \(\mathcal N\sim ((0,0), 1)\) and the general form is \(\mathcal N\sim ((\mu_x, \mu_y), (\sigma_x, \sigma_y), \rho)\). The class can be used to transform points from standard distribution to general distribution and vice versa. The class can also be used to integrate the distribution over a quarter plane.

Definition at line 53 of file bivariate_normal_distribution.h.

Constructor & Destructor Documentation

◆ BivariateNormalDistribution() [1/3]

Default constructor.

The default constructor initializes the distribution to standard form.

Definition at line 68 of file bivariate_normal_distribution.h.

◆ BivariateNormalDistribution() [2/3]

BivariateNormalDistribution ( Point2 const & mean,
double const & sigma,
double const scale = 1 )
inline

Constructor for standard distribution.

The constructor initializes the distribution to standard form.

Parameters
meanMean of the distribution
sigmaStandard deviation of the distribution
scaleScale of the distribution

Definition at line 84 of file bivariate_normal_distribution.h.

◆ BivariateNormalDistribution() [3/3]

BivariateNormalDistribution ( Point2 const & mean,
Point2 const & sigma,
double const rho,
double const scale = 1 )
inline

Constructor for general distribution.

The constructor initializes the distribution to general form.

Parameters
meanMean of the distribution
sigmaStandard deviation of the distribution
rhoCorrelation coefficient of the distribution
scaleScale of the distribution

Definition at line 103 of file bivariate_normal_distribution.h.

Member Function Documentation

◆ GetMean()

Point2 GetMean ( ) const
inline

Returns the mean of the distribution.

Definition at line 119 of file bivariate_normal_distribution.h.

◆ GetRho()

double GetRho ( ) const
inline

Returns the correlation coefficient of the distribution.

Definition at line 123 of file bivariate_normal_distribution.h.

◆ GetScale()

double GetScale ( ) const
inline

Returns the scale of the distribution.

Definition at line 125 of file bivariate_normal_distribution.h.

◆ GetSigma()

Point2 GetSigma ( ) const
inline

Returns the standard deviation of the distribution.

Definition at line 121 of file bivariate_normal_distribution.h.

◆ IntegrateQuarterPlane() [1/2]

double IntegrateQuarterPlane ( Point2 const & point) const
inline

Integrates the distribution over a quarter plane The function integrates the distribution over a quarter plane, i.e. \(x > point.x()\) and \(y > point.y()\).

Parameters
pointPoint in standard distribution
Returns
Value of the integral

Definition at line 171 of file bivariate_normal_distribution.h.

◆ IntegrateQuarterPlane() [2/2]

float IntegrateQuarterPlane ( Point2f const & point) const
inline

Definition at line 177 of file bivariate_normal_distribution.h.

◆ TransformPoint() [1/2]

Point2 TransformPoint ( Point2 const & in_point) const
inline

Transforms a point from general distribution to standard distribution.

The function takes a point in general distribution and transforms it to standard distribution.

Parameters
in_pointPoint in general distribution
Returns
Point in standard distribution

Definition at line 137 of file bivariate_normal_distribution.h.

◆ TransformPoint() [2/2]

Point2f TransformPoint ( Point2f const & in_point_f) const
inline

Definition at line 148 of file bivariate_normal_distribution.h.