alpaqa cmake-targets
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Macros | Typedefs | Functions | Variables
config.hpp File Reference
#include <alpaqa/util/quadmath/quadmath-print.hpp>
#include <alpaqa/util/quadmath/quadmath.hpp>
#include <limits>
#include <type_traits>
#include <Eigen/Core>
+ Include dependency graph for config.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  is_config< T >
 
struct  is_config< EigenConfigf >
 
struct  is_config< EigenConfigd >
 
struct  is_config< EigenConfigl >
 
struct  is_config< EigenConfigq >
 
struct  EigenConfig< RealT >
 
struct  EigenConfigf
 Single-precision float configuration. More...
 
struct  EigenConfigd
 Double-precision double configuration. More...
 
struct  EigenConfigl
 long double configuration. More...
 

Namespaces

namespace  alpaqa
 
namespace  alpaqa::vec_util
 

Concepts

concept  alpaqa::Config
 

Macros

#define USING_ALPAQA_CONFIG_NO_TYPENAME(Conf)
 
#define USING_ALPAQA_CONFIG(Conf)
 
#define USING_ALPAQA_CONFIG_TEMPLATE(Conf)
 
#define ALPAQA_IF_QUADF(...)
 
#define ALPAQA_IF_FLOAT(...)
 
#define ALPAQA_IF_LONGD(...)
 

Typedefs

using DefaultConfig = EigenConfigd
 
template<Config Conf = DefaultConfig>
using real_t = typename Conf::real_t
 
template<Config Conf = DefaultConfig>
using vec = typename Conf::vec
 
template<Config Conf = DefaultConfig>
using mvec = typename Conf::mvec
 
template<Config Conf = DefaultConfig>
using cmvec = typename Conf::cmvec
 
template<Config Conf = DefaultConfig>
using rvec = typename Conf::rvec
 
template<Config Conf = DefaultConfig>
using crvec = typename Conf::crvec
 
template<Config Conf = DefaultConfig>
using mat = typename Conf::mat
 
template<Config Conf = DefaultConfig>
using mmat = typename Conf::mmat
 
template<Config Conf = DefaultConfig>
using cmmat = typename Conf::cmmat
 
template<Config Conf = DefaultConfig>
using rmat = typename Conf::rmat
 
template<Config Conf = DefaultConfig>
using crmat = typename Conf::crmat
 
template<Config Conf = DefaultConfig>
using length_t = typename Conf::length_t
 
template<Config Conf = DefaultConfig>
using index_t = typename Conf::index_t
 
template<Config Conf = DefaultConfig>
using indexvec = typename Conf::indexvec
 
template<Config Conf = DefaultConfig>
using rindexvec = typename Conf::rindexvec
 
template<Config Conf = DefaultConfig>
using crindexvec = typename Conf::crindexvec
 
template<Config Conf = DefaultConfig>
using mindexvec = typename Conf::mindexvec
 
template<Config Conf = DefaultConfig>
using cmindexvec = typename Conf::cmindexvec
 

Functions

template<class Derived >
requires (Derived::ColsAtCompileTime == 1)
auto norm_inf (const Eigen::MatrixBase< Derived > &v)
 Get the maximum or infinity-norm of the given vector.
 
template<class Derived >
requires (Derived::ColsAtCompileTime == 1)
auto norm_1 (const Eigen::MatrixBase< Derived > &v)
 Get the 1-norm of the given vector.
 

Variables

template<class T >
constexpr bool is_config_v = is_config<T>::value
 
template<Config Conf>
constexpr const auto inf = std::numeric_limits<real_t<Conf>>::infinity()
 
template<Config Conf>
constexpr const auto NaN = std::numeric_limits<real_t<Conf>>::quiet_NaN()
 
template<Config Conf>
const rvec< Confnull_vec = mvec<Conf>{nullptr, 0}
 Global empty vector for convenience.
 
template<Config Conf>
const rindexvec< Confnull_indexvec = mindexvec<Conf>{nullptr, 0}
 Global empty index vector for convenience.
 

Class Documentation

◆ alpaqa::EigenConfig

struct alpaqa::EigenConfig
+ Collaboration diagram for EigenConfig< RealT >:
Class Members
typedef RealT real_t Real scalar element type.
typedef VectorX< real_t > vec Dynamic vector type.
typedef Map< vec > mvec Map of vector type.
typedef Map< const vec > cmvec Immutable map of vector type.
typedef Ref< vec > rvec Reference to mutable vector.
typedef Ref< const vec > crvec Reference to immutable vector.
typedef MatrixX< real_t > mat Dynamic matrix type.
typedef Map< mat > mmat Map of matrix type.
typedef Map< const mat > cmmat Immutable map of matrix type.
typedef Ref< mat > rmat Reference to mutable matrix.
typedef Ref< const mat > crmat Reference to immutable matrix.
typedef Index length_t Type for lengths and sizes.
typedef Index index_t Type for vector and matrix indices.
typedef VectorX< index_t > indexvec Dynamic vector of indices.
typedef Ref< indexvec > rindexvec Reference to mutable index vector.
typedef Ref< const indexvec > crindexvec Reference to immutable index vector.
typedef Map< indexvec > mindexvec Map of index vector type.
typedef Map< const indexvec > cmindexvec Immutable map of index vector type.

Macro Definition Documentation

◆ USING_ALPAQA_CONFIG_NO_TYPENAME

#define USING_ALPAQA_CONFIG_NO_TYPENAME (   Conf)
Value:
using real_t [[maybe_unused]] = Conf::real_t; \
using vec [[maybe_unused]] = Conf::vec; \
using mvec [[maybe_unused]] = Conf::mvec; \
using cmvec [[maybe_unused]] = Conf::cmvec; \
using rvec [[maybe_unused]] = Conf::rvec; \
using crvec [[maybe_unused]] = Conf::crvec; \
using mat [[maybe_unused]] = Conf::mat; \
using mmat [[maybe_unused]] = Conf::mmat; \
using cmmat [[maybe_unused]] = Conf::cmmat; \
using rmat [[maybe_unused]] = Conf::rmat; \
using crmat [[maybe_unused]] = Conf::crmat; \
using length_t [[maybe_unused]] = Conf::length_t; \
using index_t [[maybe_unused]] = Conf::index_t; \
using indexvec [[maybe_unused]] = Conf::indexvec; \
using rindexvec [[maybe_unused]] = Conf::rindexvec; \
using crindexvec [[maybe_unused]] = Conf::crindexvec; \
using mindexvec [[maybe_unused]] = Conf::mindexvec; \
using cmindexvec [[maybe_unused]] = Conf::cmindexvec

Definition at line 36 of file config.hpp.

◆ USING_ALPAQA_CONFIG

#define USING_ALPAQA_CONFIG (   Conf)
Value:
/** @cond CONFIG_TYPES */ \
using config_t [[maybe_unused]] = Conf; \
USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf) /** @endcond */
Examples
C++/Advanced/lasso-fbs.cpp, C++/CasADi/Rosenbrock/main.cpp, C++/CustomControlCppProblem/main.cpp, C++/CustomCppProblem/main.cpp, C++/DLProblem/main.cpp, C++/FortranProblem/main.cpp, C++/SimpleUnconstrProblem/main.cpp, and problems/sparse-logistic-regression.cpp.

Definition at line 56 of file config.hpp.

◆ USING_ALPAQA_CONFIG_TEMPLATE

#define USING_ALPAQA_CONFIG_TEMPLATE (   Conf)
Value:
/** @cond CONFIG_TYPES */ \
using config_t [[maybe_unused]] = typename Conf; \
USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf) /** @endcond */

Definition at line 60 of file config.hpp.

◆ ALPAQA_IF_QUADF

#define ALPAQA_IF_QUADF (   ...)

Definition at line 182 of file config.hpp.

◆ ALPAQA_IF_FLOAT

#define ALPAQA_IF_FLOAT (   ...)

Definition at line 188 of file config.hpp.

◆ ALPAQA_IF_LONGD

#define ALPAQA_IF_LONGD (   ...)

Definition at line 194 of file config.hpp.