alpaqa 1.0.0a18
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Functions
alpaqa::sets Namespace Reference

Classes

struct  Box
 

Functions

template<Config Conf>
Conf::real_t alpaqa_tag_invoke (tag_t< alpaqa::prox >, Box< Conf > &self, typename Conf::crmat in, typename Conf::rmat out, typename Conf::real_t γ)
 
template<Config Conf>
Conf::real_t alpaqa_tag_invoke (tag_t< alpaqa::prox_step >, Box< Conf > &self, typename Conf::crmat in, typename Conf::crmat fwd_step, typename Conf::rmat out, typename Conf::rmat fb_step, typename Conf::real_t γ, typename Conf::real_t γ_fwd)
 
template<Config Conf>
auto project (const auto &v, const Box< Conf > &box)
 Project a vector onto a box.
 
template<Config Conf>
auto projecting_difference (const auto &v, const Box< Conf > &box)
 Get the difference between the given vector and its projection.
 
template<Config Conf>
auto dist_squared (const auto &v, const Box< Conf > &box)
 Get the distance squared between the given vector and its projection.
 
template<Config Conf>
auto dist_squared (const auto &v, const Box< Conf > &box, const auto &Σ) -> real_t< Conf >
 Get the distance squared between the given vector and its projection in the Σ norm.
 

Function Documentation

◆ alpaqa_tag_invoke() [1/2]

template<Config Conf>
Conf::real_t alpaqa_tag_invoke ( tag_t< alpaqa::prox ,
Box< Conf > &  self,
typename Conf::crmat  in,
typename Conf::rmat  out,
typename Conf::real_t  γ 
)

Definition at line 12 of file indicator-box.hpp.

◆ alpaqa_tag_invoke() [2/2]

template<Config Conf>
Conf::real_t alpaqa_tag_invoke ( tag_t< alpaqa::prox_step ,
Box< Conf > &  self,
typename Conf::crmat  in,
typename Conf::crmat  fwd_step,
typename Conf::rmat  out,
typename Conf::rmat  fb_step,
typename Conf::real_t  γ,
typename Conf::real_t  γ_fwd 
)

Definition at line 29 of file indicator-box.hpp.

◆ project()

template<Config Conf>
auto project ( const auto v,
const Box< Conf > &  box 
)
inline

Project a vector onto a box.

\[ \Pi_C(v) \]

Parameters
[in]vThe vector to project
[in]boxThe box to project onto

Definition at line 37 of file box.hpp.

+ Here is the caller graph for this function:

◆ projecting_difference()

template<Config Conf>
auto projecting_difference ( const auto v,
const Box< Conf > &  box 
)
inline

Get the difference between the given vector and its projection.

\[ v - \Pi_C(v) \]

Warning
Beware catastrophic cancellation!
Parameters
[in]vThe vector to project
[in]boxThe box to project onto

Definition at line 48 of file box.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dist_squared() [1/2]

template<Config Conf>
auto dist_squared ( const auto v,
const Box< Conf > &  box 
)
inline

Get the distance squared between the given vector and its projection.

\[ \left\| v - \Pi_C(v) \right\|_2^2 \]

Warning
Beware catastrophic cancellation!
Parameters
[in]vThe vector to project
[in]boxThe box to project onto

Definition at line 59 of file box.hpp.

+ Here is the call graph for this function:

◆ dist_squared() [2/2]

template<Config Conf>
auto dist_squared ( const auto v,
const Box< Conf > &  box,
const auto Σ 
) -> real_t<Conf>
inline

Get the distance squared between the given vector and its projection in the Σ norm.

\[ \left\| v - \Pi_C(v) \right\|_\Sigma^2 = \left(v - \Pi_C(v)\right)^\top \Sigma \left(v - \Pi_C(v)\right) \]

Warning
Beware catastrophic cancellation!
Parameters
[in]vThe vector to project
[in]boxThe box to project onto
[in]ΣDiagonal matrix defining norm

Definition at line 71 of file box.hpp.

+ Here is the call graph for this function: