24#define USING_ALPAQA_CONFIG_NO_TYPENAME(Conf) \
25 using real_t [[maybe_unused]] = Conf::real_t; \
26 using vec [[maybe_unused]] = Conf::vec; \
27 using mvec [[maybe_unused]] = Conf::mvec; \
28 using cmvec [[maybe_unused]] = Conf::cmvec; \
29 using rvec [[maybe_unused]] = Conf::rvec; \
30 using crvec [[maybe_unused]] = Conf::crvec; \
31 using mat [[maybe_unused]] = Conf::mat; \
32 using mmat [[maybe_unused]] = Conf::mmat; \
33 using cmmat [[maybe_unused]] = Conf::cmmat; \
34 using rmat [[maybe_unused]] = Conf::rmat; \
35 using crmat [[maybe_unused]] = Conf::crmat; \
36 using length_t [[maybe_unused]] = Conf::length_t; \
37 using index_t [[maybe_unused]] = Conf::index_t; \
38 using indexvec [[maybe_unused]] = Conf::indexvec; \
39 using rindexvec [[maybe_unused]] = Conf::rindexvec; \
40 using crindexvec [[maybe_unused]] = Conf::crindexvec
42#define USING_ALPAQA_CONFIG(Conf) \
43 using config_t [[maybe_unused]] = Conf; \
44 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
46#define USING_ALPAQA_CONFIG_TEMPLATE(Conf) \
47 using config_t [[maybe_unused]] = typename Conf; \
48 USING_ALPAQA_CONFIG_NO_TYPENAME(typename Conf)
51template <Config Conf = DefaultConfig>
using real_t =
typename Conf::real_t;
52template <Config Conf = DefaultConfig>
using vec =
typename Conf::vec;
53template <Config Conf = DefaultConfig>
using mvec =
typename Conf::mvec;
54template <Config Conf = DefaultConfig>
using cmvec =
typename Conf::cmvec;
55template <Config Conf = DefaultConfig>
using rvec =
typename Conf::rvec;
56template <Config Conf = DefaultConfig>
using crvec =
typename Conf::crvec;
57template <Config Conf = DefaultConfig>
using mat =
typename Conf::mat;
58template <Config Conf = DefaultConfig>
using mmat =
typename Conf::mmat;
59template <Config Conf = DefaultConfig>
using cmmat =
typename Conf::cmmat;
60template <Config Conf = DefaultConfig>
using rmat =
typename Conf::rmat;
61template <Config Conf = DefaultConfig>
using crmat =
typename Conf::crmat;
62template <Config Conf = DefaultConfig>
using length_t =
typename Conf::length_t;
63template <Config Conf = DefaultConfig>
using index_t =
typename Conf::index_t;
64template <Config Conf = DefaultConfig>
using indexvec =
typename Conf::indexvec;
65template <Config Conf = DefaultConfig>
using rindexvec =
typename Conf::rindexvec;
66template <Config Conf = DefaultConfig>
using crindexvec =
typename Conf::crindexvec;
69constexpr const auto inf = std::numeric_limits<real_t<Conf>>::infinity();
71constexpr const auto NaN = std::numeric_limits<real_t<Conf>>::quiet_NaN();
79 using vec = Eigen::VectorX<real_t>;
81 using mvec = Eigen::Map<vec>;
83 using cmvec = Eigen::Map<const vec>;
85 using rvec = Eigen::Ref<vec>;
87 using crvec = Eigen::Ref<const vec>;
89 using mat = Eigen::MatrixX<real_t>;
91 using mmat = Eigen::Map<mat>;
93 using cmmat = Eigen::Map<const mat>;
95 using rmat = Eigen::Ref<mat>;
97 using crmat = Eigen::Ref<const mat>;
112 static constexpr const char *
get_name() {
return "EigenConfigf"; }
116 static constexpr const char *
get_name() {
return "EigenConfigd"; }
121 static constexpr const char *
get_name() {
return "EigenConfigl"; }
123#ifdef ALPAQA_WITH_QUAD_PRECISION
125struct EigenConfigq : EigenConfig<__float128> {
126 static constexpr const char *get_name() {
return "EigenConfigq"; }
129struct is_config<EigenConfigq> : std::true_type {};
142template <Config Conf>
149template <
class Derived>
150 requires(Derived::ColsAtCompileTime == 1)
151auto norm_inf(
const Eigen::MatrixBase<Derived> &v) {
152 return v.template lpNorm<Eigen::Infinity>();
157template <
class Derived>
158 requires(Derived::ColsAtCompileTime == 1)
159auto norm_1(
const Eigen::MatrixBase<Derived> &v) {
160 return v.template lpNorm<1>();
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::indexvec indexvec
Eigen::Ref< const indexvec > crindexvec
Reference to immutable index vector.
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::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.
typename Conf::crvec crvec
RealT real_t
Real scalar element 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()