60 assert(
Q.rows() ==
n);
61 assert(
Q.cols() ==
n);
66 assert(
A.rows() ==
m);
67 assert(
A.cols() ==
n);
76 return {
static_cast<index_t>(
Q->nrow),
86 return {
static_cast<index_t>(
A->nrow),
97 mutable ::QPALMData data{};
144 std::optional<const_ref_vec_t> bmax);
155 std::optional<const_ref_vec_t> y);
192 using workspace_ptr =
193 std::unique_ptr<::QPALMWorkspace, alloc::qpalm_workspace_cleaner>;
Stores the matrices and vectors that define the problem.
index_t m
Number of constraints (size of bmin and bmax, number of rows of A).
Data(index_t n, index_t m)
Construct a problem of dimension n with m constraints.
index_t n
Problem dimension (size of x and q, number rows and columns of Q, number of columns of A).
ladel_sparse_matrix_ptr Q
void set_A(const sparse_mat_t &A)
Set the sparse A matrix. Creates a copy.
ladel_sparse_matrix_ptr A
const ::QPALMData * get_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.
void set_Q(const sparse_mat_t &Q)
Set the sparse Q matrix. Creates a copy.
SolutionView get_solution() const
Get the solution computed by solve().
void update_Q_A(const_ref_vec_t Q_vals, const_ref_vec_t A_vals)
const QPALMInfo & get_info() const
Get the solver information from the last call to solve().
const ::QPALMWorkspace * get_c_work_ptr() const
Get a pointer to the underlying C workspace data structure.
void update_q(const_ref_vec_t q)
void warm_start(std::optional< const_ref_vec_t > x, std::optional< const_ref_vec_t > y)
void update_bounds(std::optional< const_ref_vec_t > bmin, std::optional< const_ref_vec_t > bmax)
void solve()
Solve the problem.
void update_settings(const Settings &settings)
index_t get_m() const
Get the number of constraints .
const_borrowed_vec_t get_dual_inf_certificate() const
Get the certificate of dual infeasibility of the problem.
index_t get_n() const
Get the problem dimension (size of ).
const_borrowed_vec_t get_prim_inf_certificate() const
Get the certificate of primal infeasibility of the problem.
ladel_double c_float
type for floating point numbers
::QPALMInfo Info
Information returned by the solver.
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.
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.
Eigen::Index index_t
Index types for vectors and matrices.
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).
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 ...
Solver return information.
Settings and parameters for the QPALM solver.
Settings()
Construct with default settings.
View on the solution returned by the solver.
Callable that cleans up the given workspace.
void operator()(::QPALMWorkspace *) const
Internal data structures used in QPALM.