Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Member Functions | Protected Attributes

mpCovarianceEllipse Class Reference


Detailed Description

A 2D ellipse, described by a 2x2 covariance matrix.

The relation between the multivariate Gaussian confidence interval and the "quantiles" in this class is:

The ellipse will be always centered at the origin. Use mpMovableObject::SetCoordinateBase to move it.

Definition at line 1541 of file mathplot.h.

#include <mrpt/otherlibs/mathplot/mathplot.h>

Inheritance diagram for mpCovarianceEllipse:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mpCovarianceEllipse (double cov_00=1, double cov_11=1, double cov_01=0, double quantiles=2, int segments=32, const wxString &layerName=wxT(""))
 Default constructor.
virtual ~mpCovarianceEllipse ()
double GetQuantiles () const
void SetQuantiles (double q)
 Set how many "quantiles" to draw, that is, the confidence interval of the ellipse (see above).
void SetSegments (int segments)
int GetSegments () const
void GetCovarianceMatrix (double &cov_00, double &cov_01, double &cov_11) const
 Returns the elements of the current covariance matrix:
void SetCovarianceMatrix (double cov_00, double cov_01, double cov_11)
 Changes the covariance matrix:

Protected Member Functions

void RecalculateShape ()
 Called to update the m_shape_xs, m_shape_ys vectors, whenever a parameter changes.

Protected Attributes

double m_cov_00
 The elements of the matrix (only 3 since cov(0,1)=cov(1,0) in any positive definite matrix).
double m_cov_11
double m_cov_01
double m_quantiles
int m_segments
 The number of line segments that build up the ellipse.

Constructor & Destructor Documentation

mpCovarianceEllipse::mpCovarianceEllipse ( double  cov_00 = 1,
double  cov_11 = 1,
double  cov_01 = 0,
double  quantiles = 2,
int  segments = 32,
const wxString &  layerName = wxT("") 
) [inline]

Default constructor.

Initializes to a unity diagonal covariance matrix, a 95% confidence interval (2 sigmas), 32 segments, and a continuous plot (m_continuous=true).

Definition at line 1547 of file mathplot.h.

References mpLAYER_PLOT.

virtual mpCovarianceEllipse::~mpCovarianceEllipse (  ) [inline, virtual]

Definition at line 1566 of file mathplot.h.


Member Function Documentation

void mpCovarianceEllipse::GetCovarianceMatrix ( double &  cov_00,
double &  cov_01,
double &  cov_11 
) const [inline]

Returns the elements of the current covariance matrix:

Definition at line 1583 of file mathplot.h.

double mpCovarianceEllipse::GetQuantiles (  ) const [inline]

Definition at line 1568 of file mathplot.h.

int mpCovarianceEllipse::GetSegments (  ) const [inline]

Definition at line 1579 of file mathplot.h.

void mpCovarianceEllipse::RecalculateShape (  ) [protected]

Called to update the m_shape_xs, m_shape_ys vectors, whenever a parameter changes.

void mpCovarianceEllipse::SetCovarianceMatrix ( double  cov_00,
double  cov_01,
double  cov_11 
) [inline]

Changes the covariance matrix:

Definition at line 1592 of file mathplot.h.

void mpCovarianceEllipse::SetQuantiles ( double  q ) [inline]

Set how many "quantiles" to draw, that is, the confidence interval of the ellipse (see above).

Definition at line 1572 of file mathplot.h.

void mpCovarianceEllipse::SetSegments ( int  segments ) [inline]

Definition at line 1578 of file mathplot.h.


Member Data Documentation

double mpCovarianceEllipse::m_cov_00 [protected]

The elements of the matrix (only 3 since cov(0,1)=cov(1,0) in any positive definite matrix).

Definition at line 1603 of file mathplot.h.

double mpCovarianceEllipse::m_cov_01 [protected]

Definition at line 1603 of file mathplot.h.

double mpCovarianceEllipse::m_cov_11 [protected]

Definition at line 1603 of file mathplot.h.

Definition at line 1604 of file mathplot.h.

The number of line segments that build up the ellipse.

Definition at line 1608 of file mathplot.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011