QPALM 1.2.4
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
qpalm::Data Class Reference

#include <qpalm.hpp>

Detailed Description

Stores the matrices and vectors that define the problem.

\begin{align*} & \operatorname*{\mathrm{minimize}}_x & & \tfrac{1}{2}x^\top Q x + q^\top x + c \\ & \text{subject to} & & b_\mathrm{min} \leq Ax \leq b_\mathrm{max} \end{align*}

Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 39 of file qpalm.hpp.

+ Collaboration diagram for qpalm::Data:

Public Member Functions

 Data (index_t n, index_t m)
 Construct a problem of dimension n with m constraints.
 
 Data (index_t n, index_t m, index_t nnz_Q, index_t nnz_A)
 Construct a problem of dimension n with m constraints, allocating an uninitialized upper-triangular Q matrix (with implicit symmetry) of nnz_Q entries, and an uninitialized A matrix of nnz_A entries.
 
void set_Q (const sparse_mat_ref_t &Q)
 Set the sparse Q matrix. Creates a copy.
 
void set_A (const sparse_mat_ref_t &A)
 Set the sparse A matrix. Creates a copy.
 
const ::QPALMDataget_c_data_ptr () const
 Get a pointer to the underlying C data structure.
 
sparse_mat_view_t get_Q () const
 Get a view on the Q matrix of the problem.
 
sparse_mat_view_t get_A () const
 Get a view on the A matrix of the problem.
 

Data Fields

index_t n
 Problem dimension (size of x and q, number rows and columns of Q, number of columns of A).
 
index_t m
 Number of constraints (size of bmin and bmax, number of rows of A).
 
ladel_sparse_matrix_ptr Q = ladel_sparse_create(n, n, 0, UPPER)
 
ladel_sparse_matrix_ptr A = ladel_sparse_create(m, n, 0, UNSYMMETRIC)
 
c_float c = 0
 
vec_t q = vec_t::Zero(n)
 
vec_t bmin = vec_t::Zero(m)
 
vec_t bmax = vec_t::Zero(m)
 

Constructor & Destructor Documentation

◆ Data() [1/2]

qpalm::Data::Data ( index_t  n,
index_t  m 
)
inline

Construct a problem of dimension n with m constraints.

Definition at line 56 of file qpalm.hpp.

◆ Data() [2/2]

qpalm::Data::Data ( index_t  n,
index_t  m,
index_t  nnz_Q,
index_t  nnz_A 
)
inline

Construct a problem of dimension n with m constraints, allocating an uninitialized upper-triangular Q matrix (with implicit symmetry) of nnz_Q entries, and an uninitialized A matrix of nnz_A entries.

Definition at line 60 of file qpalm.hpp.

Member Function Documentation

◆ set_Q()

void qpalm::Data::set_Q ( const sparse_mat_ref_t Q)
inline

Set the sparse Q matrix. Creates a copy.

Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 65 of file qpalm.hpp.

+ Here is the call graph for this function:

◆ set_A()

void qpalm::Data::set_A ( const sparse_mat_ref_t A)
inline

Set the sparse A matrix. Creates a copy.

Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 71 of file qpalm.hpp.

+ Here is the call graph for this function:

◆ get_c_data_ptr()

const ::QPALMData * qpalm::Data::get_c_data_ptr ( ) const

Get a pointer to the underlying C data structure.

See also
QPALMData

Definition at line 9 of file qpalm.cpp.

◆ get_Q()

sparse_mat_view_t qpalm::Data::get_Q ( ) const
inline

Get a view on the Q matrix of the problem.

Definition at line 81 of file qpalm.hpp.

◆ get_A()

sparse_mat_view_t qpalm::Data::get_A ( ) const
inline

Get a view on the A matrix of the problem.

Definition at line 91 of file qpalm.hpp.

Field Documentation

◆ n

index_t qpalm::Data::n

Problem dimension (size of x and q, number rows and columns of Q, number of columns of A).

Definition at line 43 of file qpalm.hpp.

◆ m

index_t qpalm::Data::m

Number of constraints (size of bmin and bmax, number of rows of A).

Definition at line 46 of file qpalm.hpp.

◆ Q

ladel_sparse_matrix_ptr qpalm::Data::Q = ladel_sparse_create(n, n, 0, UPPER)

Definition at line 47 of file qpalm.hpp.

◆ A

ladel_sparse_matrix_ptr qpalm::Data::A = ladel_sparse_create(m, n, 0, UNSYMMETRIC)

Definition at line 48 of file qpalm.hpp.

◆ c

c_float qpalm::Data::c = 0
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 49 of file qpalm.hpp.

◆ q

vec_t qpalm::Data::q = vec_t::Zero(n)
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 50 of file qpalm.hpp.

◆ bmin

vec_t qpalm::Data::bmin = vec_t::Zero(m)
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 51 of file qpalm.hpp.

◆ bmax

vec_t qpalm::Data::bmax = vec_t::Zero(m)
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 52 of file qpalm.hpp.


The documentation for this class was generated from the following files: