CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
TaperedCovarianceMatrix.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2014 by Federico Marulli and Alfonso Veropalumbo *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
33 #ifndef __TCOVMAT__
34 #define __TCOVMAT__
35 
36 #include "CovarianceMatrix.h"
37 
38 namespace cbl {
39 
47  namespace data {
48 
49 
60  {
61  protected:
62 
65 
67  Eigen::MatrixXd m_tapering_function;
68 
74  void m_set_tapering (const double tapering_factor);
75 
86  void m_set (const std::vector<double> matrix, const double nmeasures=-1, const double prec=1.e-10);
87 
88  public:
89 
94 
101 
112  TaperedCovarianceMatrix (const double tapering_factor, const CovarianceMatrix covariance)
113  { set(tapering_factor, covariance); }
114 
119  virtual ~TaperedCovarianceMatrix () = default;
120 
122 
127 
128 
156  void set (const double tapering_factor, const CovarianceMatrix covariance);
157 
159  };
160  }
161 }
162 
163 #endif
The class CovarianceMatrix.
The class CovarianceMatrix.
void m_set_default()
set internal attributes to default values
The class TaperedCovarianceMatrix.
Eigen::MatrixXd m_tapering_function
tapering function
void m_set_tapering(const double tapering_factor)
privat member that sets the tapering matrix
virtual ~TaperedCovarianceMatrix()=default
default destructor
void m_set(const std::vector< double > matrix, const double nmeasures=-1, const double prec=1.e-10)
set internal attributes
void set(const double tapering_factor, const CovarianceMatrix covariance)
Apply covariance tapering.
TaperedCovarianceMatrix(const double tapering_factor, const CovarianceMatrix covariance)
constructor which sets the covariance matrix
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38