8 const std::vector<qpalm::triplet_t> &triplets) {
10 M.setFromTriplets(begin(triplets), end(triplets));
21 data.
set_Q(make_sparse_matrix(n, n,
30 data.
set_A(make_sparse_matrix(m, n,
39 data.
bmin = qpalm::vec_t::Constant(m, -5.0);
40 data.
bmax = qpalm::vec_t::Constant(m, +8.0);
58 std::cout <<
"Solver status: " << info.
status <<
"\n"
59 <<
"Iter: " << info.iter <<
"\n"
60 <<
"Iter Out: " << info.iter_out <<
"\n";
63 std::cout <<
"Setup time: " << info.setup_time <<
"\n"
64 <<
"Solve time: " << info.solve_time <<
"\n"
65 <<
"Run time: " << info.run_time <<
"\n\n";
68 std::cout <<
"Solution: \n"
69 << sol.x.transpose() <<
"\n"
71 << sol.y.transpose() <<
"\n";
Stores the matrices and vectors that define the problem.
void set_A(const sparse_mat_ref_t &A)
Set the sparse A matrix. Creates a copy.
void set_Q(const sparse_mat_ref_t &Q)
Set the sparse Q matrix. Creates a copy.
SolutionView get_solution() const
Get the solution computed by solve().
const QPALMInfo & get_info() const
Get the solver information from the last call to solve().
void solve()
Solve the problem.
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.
char status[32]
status string, e.g. 'solved'
c_float eps_rel
relative convergence tolerance
c_int max_iter
maximum number of iterations
c_float eps_abs
absolute convergence tolerance
Settings and parameters for the QPALM solver.