// // Copyright (c) 2022 INRIA // /** \file */ #ifndef PROXSUITE_PROXQP_SPARSE_VIEWS_HPP #define PROXSUITE_PROXQP_SPARSE_VIEWS_HPP #include #include #include #include #include #include #include #include #include "proxsuite/proxqp/sparse/model.hpp" #include "proxsuite/proxqp/results.hpp" #include #include namespace proxsuite { namespace proxqp { namespace sparse { template struct QpView { proxsuite::linalg::sparse::MatRef H; proxsuite::linalg::sparse::DenseVecRef g; proxsuite::linalg::sparse::MatRef AT; proxsuite::linalg::sparse::DenseVecRef b; proxsuite::linalg::sparse::MatRef CT; proxsuite::linalg::sparse::DenseVecRef l; proxsuite::linalg::sparse::DenseVecRef u; }; template struct QpViewMut { proxsuite::linalg::sparse::MatMut H; proxsuite::linalg::sparse::DenseVecMut g; proxsuite::linalg::sparse::MatMut AT; proxsuite::linalg::sparse::DenseVecMut b; proxsuite::linalg::sparse::MatMut CT; proxsuite::linalg::sparse::DenseVecMut l; proxsuite::linalg::sparse::DenseVecMut u; auto as_const() noexcept -> QpView { return { H.as_const(), g.as_const(), AT.as_const(), b.as_const(), CT.as_const(), l.as_const(), u.as_const(), }; } }; } // namespace sparse } // namespace proxqp } // namespace proxsuite #endif /* end of include guard PROXSUITE_PROXQP_SPARSE_VIEWS_HPP */