5#ifndef PROXSUITE_PROXQP_DENSE_MODEL_HPP
6#define PROXSUITE_PROXQP_DENSE_MODEL_HPP
66 std::invalid_argument,
67 "wrong argument size: the dimension wrt the primal "
68 "variable x should be strictly positive.");
82 if (box_constraints) {
110 b.size(),
n_eq,
"b has not the expected size.")
112 l.size(),
n_in,
"l has not the expected size.")
114 u.size(),
n_in,
"u has not the expected size.")
115 if (box_constraints) {
117 u_box.size(),
dim,
"u_box has not the expected size");
119 l_box.size(),
dim,
"l_box has not the expected size");
123 H.rows(),
dim,
"H has not the expected number of rows.");
125 H.cols(),
dim,
"H has not the expected number of cols.");
129 std::numeric_limits<
typename decltype(
H)::Scalar>::epsilon())),
130 std::invalid_argument,
131 "H is not symmetric.");
135 A.rows(),
n_eq,
"A has not the expected number of rows.");
137 A.cols(),
dim,
"A has not the expected number of cols.");
141 C.rows(),
n_in,
"C has not the expected number of rows.");
143 C.cols(),
dim,
"C has not the expected number of cols.");
145 C.isZero(), std::invalid_argument,
"C is zero, while n_in != 0.");
#define PROXSUITE_CHECK_ARGUMENT_SIZE(size, expected_size, message)
#define PROXSUITE_THROW_PRETTY(condition, exception, message)
bool operator==(const Model< T > &model1, const Model< T > &model2)
bool operator!=(const Model< T > &model1, const Model< T > &model2)
tl::optional< T > optional
This class stores the model of the QP problem.
BackwardData< T > backward_data
proxsuite::proxqp::sparse::SparseModel< T > to_sparse()
Model(isize dim, isize n_eq, isize n_in, bool box_constraints=false)
bool is_valid(const bool box_constraints)