npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
pruneCovariance.hh
Go to the documentation of this file.
1 #ifndef EMSUNFOLD_PRUNECOVARIANCE_HH_
2 #define EMSUNFOLD_PRUNECOVARIANCE_HH_
3 
4 /*!
5 // \file pruneCovariance.hh
6 //
7 // \brief Prune small correlation coefficients in a covariance matrix
8 //
9 // Author: I. Volobouev
10 //
11 // July 2014
12 */
13 
14 #include <vector>
15 
16 #include "geners/CPP11_auto_ptr.hh"
17 #include "Eigen/SparseCore"
18 
19 namespace emsunfold {
20  /**
21  // This function will prune off-diagonal elements of a sparse
22  // symmetric positive-semidefinite matrix which correspond to
23  // correlation coefficients smaller in magnitude than "tol".
24  // This function will also make sure that the correlation
25  // coefficients do not exceed 1 in magnitude.
26  */
27  template<class Matrix>
28  CPP11_auto_ptr<std::vector<Eigen::Triplet<double,typename Matrix::Index> > >
29  pruneCovariance(const Matrix& m, double tol);
30 }
31 
32 #include "npstat/emsunfold/pruneCovariance.icc"
33 
34 #endif // EMSUNFOLD_PRUNECOVARIANCE_HH_
Definition: AbsSparseUnfoldingFilterND.hh:25
CPP11_auto_ptr< std::vector< Eigen::Triplet< double, typename Matrix::Index > > > pruneCovariance(const Matrix &m, double tol)