CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
EigenWrapper.h
Go to the documentation of this file.
1 /*******************************************************************
2  * Copyright (C) 2010 by Federico Marulli *
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 
34 #ifndef __EIGwrap__
35 #define __EIGwrap__
36 
37 #include "Kernel.h"
38 
39 namespace cbl {
40 
47  namespace wrapper {
48 
55  namespace eigen {
56 
65  std::vector<double> EigenToVector (const Eigen::MatrixXd vec);
66 
75  std::vector<std::vector<double>> EigenToMatrix (const Eigen::MatrixXd mat);
76 
85  Eigen::MatrixXd VectorToEigen (const std::vector<double> vec);
86 
95  Eigen::MatrixXd MatrixToEigen (const std::vector<std::vector<double>> mat);
96 
110  Eigen::MatrixXd SquareMatrixToEigen (const std::vector<double> mat);
111  }
112  }
113 }
114 
115 #endif
Useful generic functions.
Eigen::MatrixXd MatrixToEigen(const std::vector< std::vector< double >> mat)
convert a std::vector<std::vector<double>> to an Eigen::MatrixXd object
Eigen::MatrixXd VectorToEigen(const std::vector< double > vec)
convert a std::vector<double> to an Eigen::MatrixXd object
std::vector< double > EigenToVector(const Eigen::MatrixXd vec)
convert an Eigen::MatrixXd to a std::vector<double>
Eigen::MatrixXd SquareMatrixToEigen(const std::vector< double > mat)
convert a std::vector<double> to an Eigen::MatrixXd object
std::vector< std::vector< double > > EigenToMatrix(const Eigen::MatrixXd mat)
convert an Eigen::MatrixXd to a std::vector<std::vector<double>>
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38