36#define USING_ALPAQA_CONFIG_NO_TYPENAME(Conf) \
37 using real_t [[maybe_unused]] = Conf::real_t; \
38 using vec [[maybe_unused]] = Conf::vec; \
39 using mvec [[maybe_unused]] = Conf::mvec; \
40 using cmvec [[maybe_unused]] = Conf::cmvec; \
41 using rvec [[maybe_unused]] = Conf::rvec; \
42 using crvec [[maybe_unused]] = Conf::crvec; \
43 using mat [[maybe_unused]] = Conf::mat; \
44 using mmat [[maybe_unused]] = Conf::mmat; \
45 using cmmat [[maybe_unused]] = Conf::cmmat; \
46 using rmat [[maybe_unused]] = Conf::rmat; \
47 using crmat [[maybe_unused]] = Conf::crmat; \
48 using length_t [[maybe_unused]] = Conf::length_t; \
49 using index_t [[maybe_unused]] = Conf::index_t; \
50 using indexvec [[maybe_unused]] = Conf::indexvec; \
51 using rindexvec [[maybe_unused]] = Conf::rindexvec; \
52 using crindexvec [[maybe_unused]] = Conf::crindexvec; \
53 using mindexvec [[maybe_unused]] = Conf::mindexvec; \
54 using cmindexvec [[maybe_unused]] = Conf::cmindexvec
56#define USING_ALPAQA_CONFIG(Conf) \
57 using config_t [[maybe_unused]] = Conf; \
58 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
60#define USING_ALPAQA_CONFIG_TEMPLATE(Conf) \
61 using config_t [[maybe_unused]] = typename Conf; \
62 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
65template <Config Conf = DefaultConfig>
using real_t =
typename Conf::real_t;
66template <Config Conf = DefaultConfig>
using vec =
typename Conf::vec;
67template <Config Conf = DefaultConfig>
using mvec =
typename Conf::mvec;
68template <Config Conf = DefaultConfig>
using cmvec =
typename Conf::cmvec;
69template <Config Conf = DefaultConfig>
using rvec =
typename Conf::rvec;
70template <Config Conf = DefaultConfig>
using crvec =
typename Conf::crvec;
71template <Config Conf = DefaultConfig>
using mat =
typename Conf::mat;
72template <Config Conf = DefaultConfig>
using mmat =
typename Conf::mmat;
73template <Config Conf = DefaultConfig>
using cmmat =
typename Conf::cmmat;
74template <Config Conf = DefaultConfig>
using rmat =
typename Conf::rmat;
75template <Config Conf = DefaultConfig>
using crmat =
typename Conf::crmat;
76template <Config Conf = DefaultConfig>
using length_t =
typename Conf::length_t;
77template <Config Conf = DefaultConfig>
using index_t =
typename Conf::index_t;
78template <Config Conf = DefaultConfig>
using indexvec =
typename Conf::indexvec;
79template <Config Conf = DefaultConfig>
using rindexvec =
typename Conf::rindexvec;
80template <Config Conf = DefaultConfig>
using crindexvec =
typename Conf::crindexvec;
81template <Config Conf = DefaultConfig>
using mindexvec =
typename Conf::mindexvec;
82template <Config Conf = DefaultConfig>
using cmindexvec =
typename Conf::cmindexvec;
85constexpr const auto inf = std::numeric_limits<real_t<Conf>>
::infinity();
95 using vec = Eigen::VectorX<real_t>;
97 using mvec = Eigen::Map<vec>;
99 using cmvec = Eigen::Map<const vec>;
103 using crvec = Eigen::Ref<const vec>;
105 using mat = Eigen::MatrixX<real_t>;
109 using cmmat = Eigen::Map<const mat>;
113 using crmat = Eigen::Ref<const mat>;
132 static constexpr const char *
get_name() {
return "EigenConfigf"; }
136 static constexpr const char *
get_name() {
return "EigenConfigd"; }
141 static constexpr const char *
get_name() {
return "EigenConfigl"; }
143#ifdef ALPAQA_WITH_QUAD_PRECISION
146 static constexpr const char *get_name() {
return "EigenConfigq"; }
151template <Config Conf>
154template <Config Conf>
161template <
class Derived>
162 requires(Derived::ColsAtCompileTime == 1)
169template <
class Derived>
170 requires(Derived::ColsAtCompileTime == 1)
171auto norm_1(
const Eigen::MatrixBase<Derived> &
v) {
179#ifdef ALPAQA_WITH_QUAD_PRECISION
180#define ALPAQA_IF_QUADF(...) __VA_ARGS__
182#define ALPAQA_IF_QUADF(...)
185#ifdef ALPAQA_WITH_SINGLE_PRECISION
186#define ALPAQA_IF_FLOAT(...) __VA_ARGS__
188#define ALPAQA_IF_FLOAT(...)
191#ifdef ALPAQA_WITH_LONG_DOUBLE
192#define ALPAQA_IF_LONGD(...) __VA_ARGS__
194#define ALPAQA_IF_LONGD(...)
auto norm_inf(const Eigen::MatrixBase< Derived > &v)
Get the maximum or infinity-norm of the given vector.
auto norm_1(const Eigen::MatrixBase< Derived > &v)
Get the 1-norm of the given vector.
Eigen::Ref< const vec > crvec
Reference to immutable vector.
Eigen::Map< mat > mmat
Map of matrix type.
typename Conf::crmat crmat
Eigen::Ref< const mat > crmat
Reference to immutable matrix.
Eigen::Map< vec > mvec
Map of vector type.
typename Conf::mindexvec mindexvec
typename Conf::indexvec indexvec
Eigen::Ref< const indexvec > crindexvec
Reference to immutable index vector.
const rindexvec< Conf > null_indexvec
Global empty index vector for convenience.
constexpr bool is_config_v
Eigen::MatrixX< real_t > mat
Dynamic matrix type.
typename Conf::cmmat cmmat
Eigen::VectorX< index_t > indexvec
Dynamic vector of indices.
typename Conf::real_t real_t
const rvec< Conf > null_vec
Global empty vector for convenience.
typename Conf::rindexvec rindexvec
typename Conf::cmindexvec cmindexvec
typename Conf::index_t index_t
Eigen::Index index_t
Type for vector and matrix indices.
typename Conf::length_t length_t
Eigen::VectorX< real_t > vec
Dynamic vector type.
typename Conf::cmvec cmvec
Eigen::Ref< mat > rmat
Reference to mutable matrix.
Eigen::Index length_t
Type for lengths and sizes.
Eigen::Map< indexvec > mindexvec
Map of index vector type.
typename Conf::crvec crvec
RealT real_t
Real scalar element type.
Eigen::Map< const indexvec > cmindexvec
Immutable map of index vector type.
Eigen::Map< const vec > cmvec
Immutable map of vector type.
Eigen::Map< const mat > cmmat
Immutable map of matrix type.
Eigen::Ref< indexvec > rindexvec
Reference to mutable index vector.
Eigen::Ref< vec > rvec
Reference to mutable vector.
typename Conf::crindexvec crindexvec
Double-precision double configuration.
static constexpr const char * get_name()
Single-precision float configuration.
static constexpr const char * get_name()
long double configuration.
static constexpr const char * get_name()