OpenWalnut  1.5.0dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WCovarianceSolver Class Reference

Calculates covariances of a point data set. More...

#include <WCovarianceSolver.h>

+ Collaboration diagram for WCovarianceSolver:

Public Member Functions

 WCovarianceSolver ()
 Creates an instance of the Covariance solver. More...
 
virtual ~WCovarianceSolver ()
 Destroys the instance of the Covariance solver. More...
 
void analyzeData (const vector< WPosition > &dataSet)
 Analyzes the dimension covariances of a point data set. More...
 
WPosition getMean ()
 Returns the mean coordinate of the input point data set. More...
 
MatrixXd getCovariance ()
 Returns the covariance matrix corresponding to the input point data set. More...
 

Private Member Functions

void calculateMean (const vector< WPosition > &dataSet)
 Calculates the mean of the input point data coordinates. More...
 
void calculateCovariance (const vector< WPosition > &dataSet)
 Calculates the covariance of the input point data. More...
 
void addPointToCovariance (const WPosition &point)
 Adds a point to the covariance matrix. More...
 

Private Attributes

WPosition m_mean
 The mean of all input points. More...
 
MatrixXd m_covariance
 The calculated covariance matrix. More...
 

Detailed Description

Calculates covariances of a point data set.

Definition at line 39 of file WCovarianceSolver.h.

Constructor & Destructor Documentation

◆ WCovarianceSolver()

WCovarianceSolver::WCovarianceSolver ( )

Creates an instance of the Covariance solver.

Definition at line 28 of file WCovarianceSolver.cpp.

◆ ~WCovarianceSolver()

WCovarianceSolver::~WCovarianceSolver ( )
virtual

Destroys the instance of the Covariance solver.

Definition at line 32 of file WCovarianceSolver.cpp.

Member Function Documentation

◆ addPointToCovariance()

void WCovarianceSolver::addPointToCovariance ( const WPosition point)
private

Adds a point to the covariance matrix.

Parameters
pointPoint in the data set to be added to the covariance matrix.

Definition at line 71 of file WCovarianceSolver.cpp.

References m_covariance, and m_mean.

Referenced by calculateCovariance().

+ Here is the caller graph for this function:

◆ analyzeData()

void WCovarianceSolver::analyzeData ( const vector< WPosition > &  dataSet)

Analyzes the dimension covariances of a point data set.

Parameters
dataSetThe point data to be analyzed.

Definition at line 35 of file WCovarianceSolver.cpp.

References calculateCovariance(), and calculateMean().

Referenced by WPrincipalComponentAnalysis::analyzeData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateCovariance()

void WCovarianceSolver::calculateCovariance ( const vector< WPosition > &  dataSet)
private

Calculates the covariance of the input point data.

Parameters
dataSetInput point data that is used for the covariance matrix calculation.

Definition at line 57 of file WCovarianceSolver.cpp.

References addPointToCovariance(), m_covariance, and m_mean.

Referenced by analyzeData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateMean()

void WCovarianceSolver::calculateMean ( const vector< WPosition > &  dataSet)
private

Calculates the mean of the input point data coordinates.

Parameters
dataSetInput point data that is used for the mean coordinate calculation.

Definition at line 44 of file WCovarianceSolver.cpp.

References m_mean.

Referenced by analyzeData().

+ Here is the caller graph for this function:

◆ getCovariance()

MatrixXd WCovarianceSolver::getCovariance ( )

Returns the covariance matrix corresponding to the input point data set.

Returns
The covariances between all dimensions.

Definition at line 84 of file WCovarianceSolver.cpp.

References m_covariance.

Referenced by WPrincipalComponentAnalysis::analyzeData().

+ Here is the caller graph for this function:

◆ getMean()

WPosition WCovarianceSolver::getMean ( )

Returns the mean coordinate of the input point data set.

Returns
The mean of the point data set.

Definition at line 40 of file WCovarianceSolver.cpp.

References m_mean.

Referenced by WPrincipalComponentAnalysis::getMean().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_covariance

MatrixXd WCovarianceSolver::m_covariance
private

The calculated covariance matrix.

Definition at line 91 of file WCovarianceSolver.h.

Referenced by addPointToCovariance(), calculateCovariance(), and getCovariance().

◆ m_mean

WPosition WCovarianceSolver::m_mean
private

The mean of all input points.

Definition at line 87 of file WCovarianceSolver.h.

Referenced by addPointToCovariance(), calculateCovariance(), calculateMean(), and getMean().


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