CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::wrapper::eigen Namespace Reference

The namespace of the Eigen wrappers More...

Functions

std::vector< double > EigenToVector (const Eigen::MatrixXd vec)
 convert an Eigen::MatrixXd to a std::vector<double> More...
 
std::vector< std::vector< double > > EigenToMatrix (const Eigen::MatrixXd mat)
 convert an Eigen::MatrixXd to a std::vector<std::vector<double>> More...
 
Eigen::MatrixXd VectorToEigen (const std::vector< double > vec)
 convert a std::vector<double> to an Eigen::MatrixXd object More...
 
Eigen::MatrixXd MatrixToEigen (const std::vector< std::vector< double >> mat)
 convert a std::vector<std::vector<double>> to an Eigen::MatrixXd object More...
 
Eigen::MatrixXd SquareMatrixToEigen (const std::vector< double > mat)
 convert a std::vector<double> to an Eigen::MatrixXd object More...
 

Detailed Description

The namespace of the Eigen wrappers

The eigen namespace contains all the wrapper functions of the Eigen routines

Function Documentation

◆ EigenToMatrix()

vector< vector< double > > cbl::wrapper::eigen::EigenToMatrix ( const Eigen::MatrixXd  mat)

convert an Eigen::MatrixXd to a std::vector<std::vector<double>>

Parameters
matobject of type Eigen::MatrixXd
Returns
object of type std::vector<std::vector<double>>

Definition at line 58 of file EigenWrapper.cpp.

◆ EigenToVector()

std::vector< double > cbl::wrapper::eigen::EigenToVector ( const Eigen::MatrixXd  vec)

convert an Eigen::MatrixXd to a std::vector<double>

Parameters
vecobject of type Eigen::MatrixXd
Returns
object of type std::vector<double>

Definition at line 48 of file EigenWrapper.cpp.

◆ MatrixToEigen()

Eigen::MatrixXd cbl::wrapper::eigen::MatrixToEigen ( const std::vector< std::vector< double >>  mat)

convert a std::vector<std::vector<double>> to an Eigen::MatrixXd object

Parameters
matobject of type vector<double>
Returns
object of type Eigen::MatrixXd

Definition at line 81 of file EigenWrapper.cpp.

◆ SquareMatrixToEigen()

Eigen::MatrixXd cbl::wrapper::eigen::SquareMatrixToEigen ( const std::vector< double >  mat)

convert a std::vector<double> to an Eigen::MatrixXd object

This function converts a std::vector<double> to an Eigen::MatrixXd object. It assumes that the input vector is a flat square matrix of order equal to the square root of the vector size.

Parameters
matobject of type vector<double>
Returns
object of type Eigen::MatrixXd

Definition at line 98 of file EigenWrapper.cpp.

◆ VectorToEigen()

Eigen::MatrixXd cbl::wrapper::eigen::VectorToEigen ( const std::vector< double >  vec)

convert a std::vector<double> to an Eigen::MatrixXd object

Parameters
vecobject of type vector<double>
Returns
object of type Eigen::MatrixXd

Definition at line 72 of file EigenWrapper.cpp.