Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace > Class Template Reference

Linear complementarity problem (LCP) formulation. More...

#include <convex.hpp>

Public Types

using backend_t = Backend
using linear_op_storage_t = LinearOpStorage
using q_vector_storage_t = QVectorStorage
using linear_op_t = impl::unwrapped_storage_t<linear_op_storage_t>
using q_vector_t = impl::unwrapped_storage_t<q_vector_storage_t>
using workspace_t = Workspace
using value_type = impl::vector_value_type<q_vector_t>

Public Member Functions

 LCPProblem (Backend, linear_op_storage_t A, q_vector_storage_t q)
 LCPProblem (Backend, linear_op_storage_t A, q_vector_storage_t q, workspace_t workspace)
Backend backend () const
const auto & A () const
const auto & q () const
workspace_tworkspace () const

Detailed Description

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
class mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >

This is for a linear complementarity problem of the form: 0 <= A x + q _|_ x >= 0 where A is a symmetric positive semi-definite matrix, q is a vector, and x is the solution vector.

This is equivalent to solving the following constrained quadratic programming problem: x^* = argmin 0.5 x^T A x + q^T x s.t x in R^n, x >= 0

param Backend The backend to use for operations (e.g., KokkosBackend, MundyMathBackend)

Member Typedef Documentation

◆ backend_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::backend_t = Backend

◆ linear_op_storage_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::linear_op_storage_t = LinearOpStorage

◆ q_vector_storage_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::q_vector_storage_t = QVectorStorage

◆ linear_op_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::linear_op_t = impl::unwrapped_storage_t<linear_op_storage_t>

◆ q_vector_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::q_vector_t = impl::unwrapped_storage_t<q_vector_storage_t>

◆ workspace_t

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::workspace_t = Workspace

◆ value_type

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
using mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::value_type = impl::vector_value_type<q_vector_t>

Constructor & Destructor Documentation

◆ LCPProblem() [1/2]

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::LCPProblem ( Backend ,
linear_op_storage_t A,
q_vector_storage_t q )
inline

◆ LCPProblem() [2/2]

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::LCPProblem ( Backend ,
linear_op_storage_t A,
q_vector_storage_t q,
workspace_t workspace )
inline

Member Function Documentation

◆ backend()

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
Backend mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::backend ( ) const
inline

◆ A()

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
const auto & mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::A ( ) const
inline

◆ q()

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
const auto & mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::q ( ) const
inline

◆ workspace()

template<typename Backend, typename LinearOpStorage, typename QVectorStorage, typename Workspace = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpStorage>>>
workspace_t & mundy::convex::LCPProblem< Backend, LinearOpStorage, QVectorStorage, Workspace >::workspace ( ) const
inline