4#include <Eigen/src/Core/Map.h>
5#include <Eigen/src/Core/Matrix.h>
7#include <ladel_constants.h>
8#include <ladel_types.h>
13#include <qpalm/qpalm_cxx-export.hpp>
22using sparse_mat_t = Eigen::SparseMatrix<c_float, Eigen::ColMajor, sp_index_t>;
28using triplet_t = Eigen::Triplet<c_float, sp_index_t>;
30using vec_t = Eigen::Matrix<c_float, Eigen::Dynamic, 1>;
42 QPALM_CXX_EXPORT
void operator()(ladel_sparse_matrix *)
const;
49 std::unique_ptr<ladel_sparse_matrix, alloc::ladel_sparse_matrix_deleter>;
58QPALM_CXX_EXPORT ladel_sparse_matrix
71 bool values =
true,
bool nonzeros =
false);
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.
ladel_sparse_matrix_ptr eigen_to_ladel_copy(const sparse_mat_ref_t &mat, ladel_int symmetry=UNSYMMETRIC)
Similar to eigen_to_ladel, but creates a copy of all data, in such a way that the returned matrix is ...
Eigen::Ref< const sparse_mat_t > sparse_mat_ref_t
Read-only reference to a sparse matrix.
ladel_sparse_matrix_ptr ladel_sparse_create(index_t rows, index_t cols, index_t nnz, ladel_int symmetry, bool values=true, bool nonzeros=false)
Create an LADEL sparse matrix of the given dimensions.
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.
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.
void operator()(ladel_sparse_matrix *) const