SOPT
Sparse OPTimisation
Classes | Typedefs | Functions
sopt::details Namespace Reference

Classes

class  MatrixToLinearTransform
 Wraps a matrix into a function and its conjugate transpose. More...
 
class  MatrixAdjointToLinearTransform
 Wraps a tranposed matrix into a function and its conjugate transpose. More...
 
class  ProjectPositiveQuadrant
 Expression to create projection onto positive orthant. More...
 
class  ProjectPositiveQuadrant< std::complex< SCALAR > >
 Specialization for complex numbers. More...
 
struct  HasValueType
 
struct  HasValueType< T, typename std::enable_if< std::is_fundamental< T >::value >::type >
 
class  has_value_type
 Detects whether a class contains a value_type type. More...
 
class  has_value_type< T, true >
 
class  has_value_type< T, false >
 
class  underlying_value_type
 Computes inner-most element type. More...
 
class  underlying_value_type< T, false >
 
class  underlying_value_type< T, true >
 
class  AppliedFunction
 Expression referencing the result of a function call. More...
 
class  WrapFunction
 Wraps an std::function to return an expression. More...
 

Typedefs

template<typename SCALAR >
using SoftThreshhold = decltype(std::bind(soft_threshhold< SCALAR >, std::placeholders::_1, typename real_type< SCALAR >::type(1)))
 Helper template type alias to instantiate soft_threshhold that takes an Eigen object. More...
 

Functions

t_int gcd (t_int a, t_int b)
 Greatest common divisor. More...
 
template<typename VECTOR >
WrapFunction< VECTOR > wrap (OperatorFunction< VECTOR > const &func, std::array< t_int, 3 > sizes={{1, 1, 0}})
 Helper function to wrap functor into expression-able object. More...
 

Typedef Documentation

◆ SoftThreshhold

template<typename SCALAR >
using sopt::details::SoftThreshhold = typedef decltype(std::bind(soft_threshhold<SCALAR>, std::placeholders::_1, typename real_type<SCALAR>::type(1)))

Helper template type alias to instantiate soft_threshhold that takes an Eigen object.

Definition at line 53 of file maths.h.

Function Documentation

◆ gcd()

t_int sopt::details::gcd ( t_int  a,
t_int  b 
)
inline

Greatest common divisor.

Definition at line 207 of file maths.h.

207 { return b == 0 ? a : gcd(b, a % b); }
constexpr Scalar b
constexpr Scalar a
t_int gcd(t_int a, t_int b)
Greatest common divisor.
Definition: maths.h:207

References a, and b.

Referenced by sopt::linear_transform().

◆ wrap()

template<typename VECTOR >
WrapFunction<VECTOR> sopt::details::wrap ( OperatorFunction< VECTOR > const &  func,
std::array< t_int, 3 >  sizes = {{1, 1, 0}} 
)

Helper function to wrap functor into expression-able object.

Definition at line 131 of file wrapper.h.

132  {{1, 1, 0}}) {
133  return WrapFunction<VECTOR>(func, sizes);
134 }