proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
common.hpp File Reference
#include "proxsuite/config.hpp"
#include <limits>
Include dependency graph for common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  proxsuite::helpers::infinite_bound< Scalar >
 

Namespaces

namespace  proxsuite
 
namespace  proxsuite::helpers
 

Macros

#define PROXSUITE_DEDUCE_RET(...)
 

Functions

template<typename T , typename Scalar >
auto proxsuite::helpers::at_most (T const &expr, const Scalar value) PROXSUITE_DEDUCE_RET((expr.array()< value).select(expr
 Returns the part of the expression which is lower than value.
 
template<typename T , typename Scalar >
auto proxsuite::helpers::at_least (T const &expr, const Scalar value) PROXSUITE_DEDUCE_RET((expr.array() > value).select(expr
 Returns the part of the expression which is greater than value.
 
template<typename T >
auto proxsuite::helpers::positive_part (T const &expr) PROXSUITE_DEDUCE_RET((expr.array() > 0).select(expr
 Returns the positive part of an expression.
 
template<typename T >
auto proxsuite::helpers::negative_part (T const &expr) PROXSUITE_DEDUCE_RET((expr.array()< 0).select(expr
 Returns the negative part of an expression.
 
template<typename Condition , typename T , typename Scalar >
auto proxsuite::helpers::select (Condition const &condition, T const &expr, const Scalar value) PROXSUITE_DEDUCE_RET((condition).select(expr
 Select the components of the expression if the condition is fullfiled. Otherwise, set the component to value.
 

Macro Definition Documentation

◆ PROXSUITE_DEDUCE_RET

#define PROXSUITE_DEDUCE_RET ( ...)
Value:
noexcept(noexcept(__VA_ARGS__)) \
->typename std::remove_const<decltype(__VA_ARGS__)>::type \
{ \
return __VA_ARGS__; \
} \
static_assert(true, ".")

Definition at line 27 of file common.hpp.