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.");
77 u.fill(+infinite_bound_value);
79 l.fill(-infinite_bound_value);
82 if (box_constraints) {
86 +infinite_bound_value);
89 -infinite_bound_value);
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.");
155 bool value = model1.
dim == model2.
dim && model1.
n_eq == model2.
n_eq &&
157 model1.
H == model2.
H && model1.
g == model2.
g &&
158 model1.
A == model2.
A && model1.
b == model2.
b &&
159 model1.
C == model2.
C && model1.
l == model2.
l &&
169 return !(model1 == model2);
#define PROXSUITE_CHECK_ARGUMENT_SIZE(size, expected_size, message)
#define PROXSUITE_THROW_PRETTY(condition, exception, message)
Eigen::SparseMatrix< T, 1 > SparseMat
bool operator==(const Model< T > &model1, const Model< T > &model2)
Eigen::Matrix< T, DYN, 1 > Vec
Eigen::Matrix< T, DYN, DYN, l > Mat
bool operator!=(const Model< T > &model1, const Model< T > &model2)
This class stores the jacobians of PROXQP solvers with dense backends at a solutions wrt model parame...
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)