51#define USING_ALPAQA_CONFIG_NO_TYPENAME(Conf) \
52 using real_t [[maybe_unused]] = Conf::real_t; \
53 using cplx_t [[maybe_unused]] = Conf::cplx_t; \
54 using vec [[maybe_unused]] = Conf::vec; \
55 using mvec [[maybe_unused]] = Conf::mvec; \
56 using cmvec [[maybe_unused]] = Conf::cmvec; \
57 using rvec [[maybe_unused]] = Conf::rvec; \
58 using crvec [[maybe_unused]] = Conf::crvec; \
59 using mat [[maybe_unused]] = Conf::mat; \
60 using mmat [[maybe_unused]] = Conf::mmat; \
61 using cmmat [[maybe_unused]] = Conf::cmmat; \
62 using rmat [[maybe_unused]] = Conf::rmat; \
63 using crmat [[maybe_unused]] = Conf::crmat; \
64 using cmat [[maybe_unused]] = Conf::cmat; \
65 using mcmat [[maybe_unused]] = Conf::mcmat; \
66 using cmcmat [[maybe_unused]] = Conf::cmcmat; \
67 using rcmat [[maybe_unused]] = Conf::rcmat; \
68 using crcmat [[maybe_unused]] = Conf::crcmat; \
69 using length_t [[maybe_unused]] = Conf::length_t; \
70 using index_t [[maybe_unused]] = Conf::index_t; \
71 using indexvec [[maybe_unused]] = Conf::indexvec; \
72 using rindexvec [[maybe_unused]] = Conf::rindexvec; \
73 using crindexvec [[maybe_unused]] = Conf::crindexvec; \
74 using mindexvec [[maybe_unused]] = Conf::mindexvec; \
75 using cmindexvec [[maybe_unused]] = Conf::cmindexvec
77#define USING_ALPAQA_CONFIG(Conf) \
78 using config_t [[maybe_unused]] = Conf; \
79 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
81#define USING_ALPAQA_CONFIG_TEMPLATE(Conf) \
82 using config_t [[maybe_unused]] = typename Conf; \
83 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
86template <Config Conf = DefaultConfig>
using real_t =
typename Conf::real_t;
87template <Config Conf = DefaultConfig>
using cplx_t =
typename Conf::cplx_t;
88template <Config Conf = DefaultConfig>
using vec =
typename Conf::vec;
89template <Config Conf = DefaultConfig>
using mvec =
typename Conf::mvec;
90template <Config Conf = DefaultConfig>
using cmvec =
typename Conf::cmvec;
91template <Config Conf = DefaultConfig>
using rvec =
typename Conf::rvec;
92template <Config Conf = DefaultConfig>
using crvec =
typename Conf::crvec;
93template <Config Conf = DefaultConfig>
using mat =
typename Conf::mat;
94template <Config Conf = DefaultConfig>
using mmat =
typename Conf::mmat;
95template <Config Conf = DefaultConfig>
using cmmat =
typename Conf::cmmat;
96template <Config Conf = DefaultConfig>
using rmat =
typename Conf::rmat;
97template <Config Conf = DefaultConfig>
using crmat =
typename Conf::crmat;
98template <Config Conf = DefaultConfig>
using cmat =
typename Conf::cmat;
99template <Config Conf = DefaultConfig>
using mcmat =
typename Conf::mcmat;
100template <Config Conf = DefaultConfig>
using cmcmat =
typename Conf::cmcmat;
101template <Config Conf = DefaultConfig>
using rcmat =
typename Conf::rcmat;
102template <Config Conf = DefaultConfig>
using crcmat =
typename Conf::crcmat;
103template <Config Conf = DefaultConfig>
using length_t =
typename Conf::length_t;
104template <Config Conf = DefaultConfig>
using index_t =
typename Conf::index_t;
105template <Config Conf = DefaultConfig>
using indexvec =
typename Conf::indexvec;
106template <Config Conf = DefaultConfig>
using rindexvec =
typename Conf::rindexvec;
107template <Config Conf = DefaultConfig>
using crindexvec =
typename Conf::crindexvec;
108template <Config Conf = DefaultConfig>
using mindexvec =
typename Conf::mindexvec;
109template <Config Conf = DefaultConfig>
using cmindexvec =
typename Conf::cmindexvec;
111template <Config Conf>
113template <Config Conf>
117template <
class RealT>
124 using vec = Eigen::VectorX<real_t>;
128 using cmvec = Eigen::Map<const vec>;
132 using crvec = Eigen::Ref<const vec>;
134 using mat = Eigen::MatrixX<real_t>;
138 using cmmat = Eigen::Map<const mat>;
142 using crmat = Eigen::Ref<const mat>;
144 using cmat = Eigen::MatrixX<cplx_t>;
171 static constexpr const char *
get_name() {
return "EigenConfigf"; }
175 static constexpr const char *
get_name() {
return "EigenConfigd"; }
180 static constexpr const char *
get_name() {
return "EigenConfigl"; }
182#ifdef ALPAQA_WITH_QUAD_PRECISION
185 static constexpr const char *get_name() {
return "EigenConfigq"; }
190template <Config Conf>
193template <Config Conf>
200template <
class Derived>
201 requires(Derived::ColsAtCompileTime == 1)
208template <
class Derived>
209 requires(Derived::ColsAtCompileTime == 1)
210auto norm_1(
const Eigen::MatrixBase<Derived> &
v) {
218#ifdef ALPAQA_WITH_QUAD_PRECISION
219#define ALPAQA_IF_QUADF(...) __VA_ARGS__
221#define ALPAQA_IF_QUADF(...)
224#ifdef ALPAQA_WITH_SINGLE_PRECISION
225#define ALPAQA_IF_FLOAT(...) __VA_ARGS__
227#define ALPAQA_IF_FLOAT(...)
230#ifdef ALPAQA_WITH_LONG_DOUBLE
231#define ALPAQA_IF_LONGD(...) __VA_ARGS__
233#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::MatrixX< cplx_t > cmat
Dynamic complex matrix type.
Eigen::Ref< const vec > crvec
Reference to immutable vector.
typename Conf::crcmat crcmat
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.
constexpr bool is_eigen_config_v
const rindexvec< Conf > null_indexvec
Global empty index vector for convenience.
typename Conf::cmcmat cmcmat
constexpr bool is_config_v
Eigen::MatrixX< real_t > mat
Dynamic matrix type.
typename Conf::cmmat cmmat
Eigen::Ref< const cmat > crcmat
Reference to immutable complex matrix.
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::rcmat rcmat
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
typename Conf::cplx_t cplx_t
typename Conf::mcmat mcmat
RealT real_t
Real scalar element type.
Eigen::Map< const indexvec > cmindexvec
Immutable map of index vector type.
Eigen::Ref< cmat > rcmat
Reference to mutable complex matrix.
Eigen::Map< const vec > cmvec
Immutable map of vector type.
Eigen::Map< cmat > mcmat
Map of complex matrix type.
Eigen::Map< const cmat > cmcmat
Immutable map of complex matrix type.
std::complex< real_t > cplx_t
Complex scalar element 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()