5#ifndef PROXSUITE_PROXQP_SPARSE_MODEL_HPP
6#define PROXSUITE_PROXQP_SPARSE_MODEL_HPP
21template<
typename T,
typename I>
60 std::invalid_argument,
61 "wrong argument size: the dimension wrt primal "
62 "variable x should be strictly positive.");
69 u.fill(+infinite_bound_value);
71 l.fill(-infinite_bound_value);
81 isize(proxsuite::linalg::sparse::util::zero_extend(
kkt_col_ptrs[n_tot]));
83 proxsuite::linalg::sparse::from_raw_parts,
100 isize(proxsuite::linalg::sparse::util::zero_extend(
kkt_col_ptrs[n_tot]));
102 proxsuite::linalg::sparse::from_raw_parts,
118 auto nnz = isize(proxsuite::linalg::sparse::util::zero_extend(
121 proxsuite::linalg::sparse::from_raw_parts,
137 auto nnz = isize(proxsuite::linalg::sparse::util::zero_extend(
140 proxsuite::linalg::sparse::from_raw_parts,
152template<
typename _Scalar>
163 Eigen::SparseMatrix<Scalar, 1>
H;
165 Eigen::SparseMatrix<Scalar, 1>
A;
167 Eigen::SparseMatrix<Scalar, 1>
C;
171 template<
typename Vector_g,
176 const Eigen::MatrixBase<Vector_g>&
g,
177 const Eigen::SparseMatrix<Scalar, 1>&
A,
178 const Eigen::MatrixBase<Vector_b>&
b,
179 const Eigen::SparseMatrix<Scalar, 1>&
C,
180 const Eigen::MatrixBase<Vector_u>&
u,
181 const Eigen::MatrixBase<Vector_l>&
l) noexcept
195 { proxqp::from_eigen,
H },
196 { proxqp::from_eigen,
g },
197 { proxqp::from_eigen,
A },
198 { proxqp::from_eigen,
b },
199 { proxqp::from_ptr_rows_cols_stride,
202 proxqp::isize(
H.rows()),
204 { proxqp::from_ptr_size,
nullptr, 0 },
210 { proxqp::from_eigen,
H },
211 { proxqp::from_eigen,
g },
212 { proxqp::from_eigen,
A },
213 { proxqp::from_eigen,
b },
214 { proxqp::from_ptr_rows_cols_stride,
217 proxqp::isize(
H.rows()),
219 { proxqp::from_ptr_size,
nullptr, 0 },
#define PROXSUITE_THROW_PRETTY(condition, exception, message)
Eigen::Ref< Eigen::Matrix< T, DYN, DYN > const > MatRef
VEG_NODISCARD VEG_INLINE auto ptr_mut() VEG_NOEXCEPT -> T *
VEG_NODISCARD VEG_INLINE auto ptr() const VEG_NOEXCEPT -> T const *
VEG_NODISCARD VEG_INLINE auto len() const VEG_NOEXCEPT -> isize
This class stores the model of the QP problem.
auto kkt_unscaled() const -> proxsuite::linalg::sparse::MatRef< T, I >
proxsuite::linalg::veg::Vec< I > kkt_col_ptrs
proxsuite::linalg::veg::Vec< T > kkt_values
Eigen::Matrix< T, Eigen::Dynamic, 1 > VectorType
Model(isize dim, isize n_eq, isize n_in)
proxsuite::linalg::veg::Vec< I > kkt_row_indices_unscaled
proxsuite::linalg::veg::Vec< T > kkt_values_unscaled
auto kkt_mut() -> proxsuite::linalg::sparse::MatMut< T, I >
auto kkt_mut_unscaled() -> proxsuite::linalg::sparse::MatMut< T, I >
auto kkt() const -> proxsuite::linalg::sparse::MatRef< T, I >
proxsuite::linalg::veg::Vec< I > kkt_row_indices
proxsuite::linalg::veg::Vec< I > kkt_col_ptrs_unscaled
auto as_view() -> proxqp::dense::QpView< Scalar >
SparseModel(const Eigen::SparseMatrix< Scalar, 1 > &H, const Eigen::MatrixBase< Vector_g > &g, const Eigen::SparseMatrix< Scalar, 1 > &A, const Eigen::MatrixBase< Vector_b > &b, const Eigen::SparseMatrix< Scalar, 1 > &C, const Eigen::MatrixBase< Vector_u > &u, const Eigen::MatrixBase< Vector_l > &l) noexcept
Eigen::SparseMatrix< Scalar, 1 > C
Eigen::SparseMatrix< Scalar, 1 > H
Eigen::SparseMatrix< Scalar, 1 > A
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorType
auto as_mut() -> proxqp::dense::QpViewMut< Scalar >