jrl::qp::internal Namespace Reference

Classes

class  ActiveSet
 
class  always_false
 
class  always_true
 
class  ConstraintNormal
 
class  ElemOrthonormalSequence
 
struct  identity
 
class  InitTermination
 
struct  is_base
 
struct  NotConst
 
class  OrthonormalSequence
 
class  PartitionnedQ
 
class  SelectedConstraint
 
class  SingleNZSegmentVector
 
class  TerminationType
 
struct  to_underlying_type
 
class  Workspace
 

Typedefs

template<typename T , typename... Base>
using enable_for_t = std::enable_if_t<(...||(std::is_same_v< T, Base >||derives_from< T, Base >())), int >
 
template<typename T , template< typename... > class... Base>
using enable_for_templated_t = std::enable_if_t<(...||derives_from< T, Base >()), int >
 
template<typename T >
using cast_as_underlying_if_enum = std::conditional_t< std::is_enum_v< T >, to_underlying_type, identity >
 

Enumerations

enum  OSeqType { OSeqType::Householder, OSeqType::Givens, OSeqType::Permutation }
 

Functions

std::ostream & operator<< (std::ostream &os, const ActiveSet &a)
 
void JRLQP_DLLAPI check_that_malloc_is_allowed ()
 
bool JRLQP_DLLAPI set_is_malloc_allowed (bool allow)
 
template<typename T , template< typename... > class Base>
constexpr bool derives_from ()
 
bool is_malloc_allowed_impl (bool update, bool new_value=false)
 

Typedef Documentation

◆ cast_as_underlying_if_enum

template<typename T >
using jrl::qp::internal::cast_as_underlying_if_enum = typedef std::conditional_t<std::is_enum_v<T>, to_underlying_type, identity>

Helper functor that takes an argument and

  • returns it as is, if it is not an enum
  • cast it as its underlying type if it is one

◆ enable_for_t

template<typename T , typename... Base>
using jrl::qp::internal::enable_for_t = typedef std::enable_if_t<(... || (std::is_same_v<T, Base> || derives_from<T, Base>())), int>

Used to enable a function for a list of types.

To have a function work for T equal or deriving from any B1, B2, ... or Bk where Bi are types. Use as template<typename T, enable_for_t<T,B1, B2, ..., ..., Bk>=0>

◆ enable_for_templated_t

template<typename T , template< typename... > class... Base>
using jrl::qp::internal::enable_for_templated_t = typedef std::enable_if_t<(... || derives_from<T, Base>()), int>

Used to enable a function for a list of templated classes.

To have a function work for T equal or deriving from any B1, B2, ... or Bk where Bi are a templated classes. Use as template<typename T, enable_for_templated_t<T,B1, B2, ..., ..., Bk>=0>

Enumeration Type Documentation

◆ OSeqType

Enumerator
Householder 
Givens 
Permutation 

Function Documentation

◆ check_that_malloc_is_allowed()

void jrl::qp::internal::check_that_malloc_is_allowed ( )

Check if dynamic allocation is allowed in Eigen operations.

◆ derives_from()

template<typename T , template< typename... > class Base>
constexpr bool jrl::qp::internal::derives_from ( )
constexpr

Check if class \t T derives from the templated class \t Base.

This relies on jrl::qp::internal::is_base::check: if T derives from \t Base, the overload returning std::true_type will be selected, otherwise, it will be the one returning std::false_type.

Adapted from https://stackoverflow.com/a/5998303/11611648

Check if class \t T derives from the non-templated class \t Base This returns false if \t Base is not a class.

◆ is_malloc_allowed_impl()

bool jrl::qp::internal::is_malloc_allowed_impl ( bool  update,
bool  new_value = false 
)

◆ operator<<()

std::ostream & jrl::qp::internal::operator<< ( std::ostream &  os,
const ActiveSet a 
)

Printing an active set to a stream.

◆ set_is_malloc_allowed()

bool jrl::qp::internal::set_is_malloc_allowed ( bool  allow)

Allow or disallow dynamic allocation in Eigen operations.