4#include <Eigen/src/Core/Map.h>
5#include <Eigen/src/Core/Matrix.h>
8#include <ladel_constants.h>
9#include <ladel_types.h>
22using sparse_mat_t = Eigen::SparseMatrix<c_float, Eigen::ColMajor, sp_index_t>;
26using triplet_t = Eigen::Triplet<c_float, sp_index_t>;
28using vec_t = Eigen::Matrix<c_float, Eigen::Dynamic, 1>;
47 std::unique_ptr<ladel_sparse_matrix, alloc::ladel_sparse_matrix_deleter>;
57 ladel_int symmetry = UNSYMMETRIC);
Custom memory allocation, print and utility functions, and data types for floats and ints.
Eigen::Matrix< c_float, Eigen::Dynamic, 1 > vec_t
Owning dense vector type.
Eigen::Ref< const vec_t > const_ref_vec_t
Read-only reference to a dense vector (vector view).
Eigen::Map< const sparse_mat_t > sparse_mat_view_t
Read-only view on a sparse matrix.
ladel_int sp_index_t
Index type for sparse matrices representation.
std::unique_ptr< ladel_sparse_matrix, alloc::ladel_sparse_matrix_deleter > ladel_sparse_matrix_ptr
Smart pointer that automatically cleans up an owning ladel_sparse_matrix object.
QPALM_CXX_EXPORT ladel_sparse_matrix eigen_to_ladel(sparse_mat_t &mat, ladel_int symmetry=UNSYMMETRIC)
Convert an Eigen sparse matrix to a LADEL sparse matrix, without creating a copy.
Eigen::Index index_t
Index types for vectors and matrices.
Eigen::Map< vec_t > borrowed_vec_t
Borrowed dense vector type (vector view).
Eigen::Ref< vec_t > ref_vec_t
Reference to a dense vector (vector view).
Eigen::SparseMatrix< c_float, Eigen::ColMajor, sp_index_t > sparse_mat_t
Owning sparse matrix type.
Eigen::Map< const vec_t > const_borrowed_vec_t
Read-only borrowed dense vector type (vector view).
Eigen::Triplet< c_float, sp_index_t > triplet_t
Type for (row, column, value) triplets for initializing sparse matrices.
QPALM_CXX_EXPORT ladel_sparse_matrix_ptr eigen_to_ladel_copy(const sparse_mat_t &mat)
Similar to eigen_to_ladel, but creates a copy of all data, in such a way that the returned matrix is ...
QPALM_CXX_EXPORT void operator()(ladel_sparse_matrix *) const