Defined in header <scicpp/linalg.hpp>
Convert a standard container to an Eigen::Matrix.
T>to_eigen_matrix(const std::vector<T> &v, int size = -1)¶Convert a std::vector to an Eigen::Matrix of dynamic size.
If a size parameter is specified then the output vector is cropped.
size = -1, typename T, std::size_t N>to_eigen_matrix(const std::array<T, N> &a)¶Convert a std::array to an Eigen::Matrix of fixed size.
The output size is M = N if the size template parameter is not specified, else M = size.