QPALM 1.2.5
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
Namespaces | Data Structures | Typedefs | Functions
qpalm Namespace Reference

Detailed Description

See also
C++ Interface

Namespaces

namespace  alloc
 RAII-based wrappers for the allocation and deallocation functions of the C API.
 

Data Structures

class  Data
 Stores the matrices and vectors that define the problem. More...
 
struct  Settings
 Settings and parameters for the QPALM solver. More...
 
struct  SolutionView
 View on the solution returned by the solver. More...
 
class  Solver
 Main QPALM solver. More...
 

Typedefs

using Info = ::QPALMInfo
 Information returned by the solver.
 
using index_t = Eigen::Index
 Index types for vectors and matrices.
 
using sp_index_t = ladel_int
 Index type for sparse matrices representation.
 
using sparse_mat_t = Eigen::SparseMatrix< c_float, Eigen::ColMajor, sp_index_t >
 Owning sparse matrix type.
 
using sparse_mat_view_t = Eigen::Map< const sparse_mat_t >
 Read-only view on a sparse matrix.
 
using sparse_mat_ref_t = Eigen::Ref< const sparse_mat_t >
 Read-only reference to a sparse matrix.
 
using triplet_t = Eigen::Triplet< c_float, sp_index_t >
 Type for (row, column, value) triplets for initializing sparse matrices.
 
using vec_t = Eigen::Matrix< c_float, Eigen::Dynamic, 1 >
 Owning dense vector type.
 
using borrowed_vec_t = Eigen::Map< vec_t >
 Borrowed dense vector type (vector view).
 
using const_borrowed_vec_t = Eigen::Map< const vec_t >
 Read-only borrowed dense vector type (vector view).
 
using ref_vec_t = Eigen::Ref< vec_t >
 Reference to a dense vector (vector view).
 
using const_ref_vec_t = Eigen::Ref< const vec_t >
 Read-only reference to a dense vector (vector view).
 
using ladel_sparse_matrix_ptr = std::unique_ptr< ladel_sparse_matrix, alloc::ladel_sparse_matrix_deleter >
 Smart pointer that automatically cleans up an owning ladel_sparse_matrix object.
 
using QPALMInfo = ::QPALMInfo
 

Functions

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.
 
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.
 
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 completely decoupled from mat, and such that it can be reallocated and deallocated by the ladel_sparse_free and similar functions.
 

Typedef Documentation

◆ index_t

using qpalm::index_t = typedef Eigen::Index

Index types for vectors and matrices.

Definition at line 18 of file sparse.hpp.

◆ sp_index_t

using qpalm::sp_index_t = typedef ladel_int

Index type for sparse matrices representation.

Definition at line 20 of file sparse.hpp.

◆ sparse_mat_t

using qpalm::sparse_mat_t = typedef Eigen::SparseMatrix<c_float, Eigen::ColMajor, sp_index_t>

Owning sparse matrix type.

Definition at line 22 of file sparse.hpp.

◆ sparse_mat_view_t

using qpalm::sparse_mat_view_t = typedef Eigen::Map<const sparse_mat_t>

Read-only view on a sparse matrix.

Definition at line 24 of file sparse.hpp.

◆ sparse_mat_ref_t

using qpalm::sparse_mat_ref_t = typedef Eigen::Ref<const sparse_mat_t>

Read-only reference to a sparse matrix.

Definition at line 26 of file sparse.hpp.

◆ triplet_t

using qpalm::triplet_t = typedef Eigen::Triplet<c_float, sp_index_t>

Type for (row, column, value) triplets for initializing sparse matrices.

Definition at line 28 of file sparse.hpp.

◆ vec_t

using qpalm::vec_t = typedef Eigen::Matrix<c_float, Eigen::Dynamic, 1>

Owning dense vector type.

Definition at line 30 of file sparse.hpp.

◆ borrowed_vec_t

using qpalm::borrowed_vec_t = typedef Eigen::Map<vec_t>

Borrowed dense vector type (vector view).

Definition at line 32 of file sparse.hpp.

◆ const_borrowed_vec_t

using qpalm::const_borrowed_vec_t = typedef Eigen::Map<const vec_t>

Read-only borrowed dense vector type (vector view).

Definition at line 34 of file sparse.hpp.

◆ ref_vec_t

using qpalm::ref_vec_t = typedef Eigen::Ref<vec_t>

Reference to a dense vector (vector view).

Definition at line 36 of file sparse.hpp.

◆ const_ref_vec_t

using qpalm::const_ref_vec_t = typedef Eigen::Ref<const vec_t>

Read-only reference to a dense vector (vector view).

Definition at line 38 of file sparse.hpp.

◆ ladel_sparse_matrix_ptr

using qpalm::ladel_sparse_matrix_ptr = typedef std::unique_ptr<ladel_sparse_matrix, alloc::ladel_sparse_matrix_deleter>

Smart pointer that automatically cleans up an owning ladel_sparse_matrix object.

Definition at line 48 of file sparse.hpp.

◆ QPALMInfo

using qpalm::QPALMInfo = typedef ::QPALMInfo

Definition at line 25 of file qpalm.cpp.

Function Documentation

◆ eigen_to_ladel()

ladel_sparse_matrix qpalm::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.

Note
The returned object contains pointers to the data of mat, so do not reallocate or deallocate using the ladel_sparse_free and similar functions. Modifications of the returned LADEL matrix will affect the original Eigen matrix, so make sure that the representation remains consistent.

Definition at line 10 of file sparse.cpp.

◆ ladel_sparse_create()

ladel_sparse_matrix_ptr qpalm::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.

Parameters
rowsNumber of rows.
colsNumber of columns.
nnzNumber of nonzeros.
symmetryEither UNSYMMETRIC, UPPER or LOWER.
valuesWhether to allocate the array of nonzero values.
nonzerosWhether to allocate the array of nonzero counts.
See also
ladel_sparse_alloc

Definition at line 30 of file sparse.cpp.

+ Here is the caller graph for this function:

◆ eigen_to_ladel_copy()

ladel_sparse_matrix_ptr qpalm::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 completely decoupled from mat, and such that it can be reallocated and deallocated by the ladel_sparse_free and similar functions.

Definition at line 41 of file sparse.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: