akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
Loading...
Searching...
No Matches
convex::WeightedSum< Space > Struct Template Reference

weighted sum (AKA Dot) More...

#include <weighted_sum.hpp>

Public Types

using T = linalg::space_type_t< Space >
 type
 
using Vec = linalg::Vector< T, N >
 vec type for q
 

Public Member Functions

template<AtomLike Var>
constexpr auto operator() (const Vec &q, const Var &x)
 operator overload
 

Static Public Attributes

static constexpr std::size_t N = linalg::space_dim_v<Space>
 

Detailed Description

template<linalg::RnSpace Space>
struct convex::WeightedSum< Space >

weighted sum (AKA Dot)

f(x) = q^T x

Definition at line 19 of file weighted_sum.hpp.

Member Typedef Documentation

◆ T

template<linalg::RnSpace Space>
using convex::WeightedSum< Space >::T = linalg::space_type_t<Space>

type

Definition at line 21 of file weighted_sum.hpp.

◆ Vec

template<linalg::RnSpace Space>
using convex::WeightedSum< Space >::Vec = linalg::Vector<T, N>

vec type for q

Definition at line 25 of file weighted_sum.hpp.

Member Function Documentation

◆ operator()()

template<linalg::RnSpace Space>
template<AtomLike Var>
constexpr auto convex::WeightedSum< Space >::operator() ( const Vec &  q,
const Var &  x 
)
inlineconstexpr

operator overload

Parameters
qin R^n
xin R^n (var)
Returns
q^T x

Definition at line 36 of file weighted_sum.hpp.

References convex::dom_size_v.

Member Data Documentation

◆ N

template<linalg::RnSpace Space>
constexpr std::size_t convex::WeightedSum< Space >::N = linalg::space_dim_v<Space>
staticconstexpr

Definition at line 22 of file weighted_sum.hpp.


The documentation for this struct was generated from the following file: