|
template<typename C , typename Descriptors , std::enable_if_t< values::scalar< C > and pattern_collection< Descriptors > and std::is_constructible_v< MyConstant, C &&> and compatible_with_vector_space_descriptor_collection< PatternMatrix, Descriptors >, int > = 0> |
constexpr | ConstantAdapter (C &&c, Descriptors &&descriptors) |
| Construct from values::scalar and a pattern_collection.
|
|
template<typename Descriptors , std::enable_if_t< pattern_collection< Descriptors > and values::fixed< MyConstant > and compatible_with_vector_space_descriptor_collection< PatternMatrix, Descriptors >, int > = 0> |
constexpr | ConstantAdapter (Descriptors &&descriptors) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename C , typename Arg , std::enable_if_t< values::scalar< C > and vector_space_descriptors_may_match_with< Arg, PatternMatrix > and std::is_constructible_v< MyConstant, C &&>, int > = 0> |
constexpr | ConstantAdapter (C &&c, const Arg &arg) |
| Construct based on a values::scalar and the shape of an indexible reference object. More...
|
|
template<typename Arg , std::enable_if_t< vector_space_descriptors_may_match_with< Arg, PatternMatrix > and(not std::is_base_of_v< ConstantAdapter, Arg >) and values::fixed< MyConstant >, int > = 0> |
constexpr | ConstantAdapter (const Arg &arg) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename Arg , std::enable_if_t< constant_matrix< Arg > and(not std::is_base_of_v< ConstantAdapter, Arg >) and vector_space_descriptors_may_match_with< Arg, PatternMatrix > and std::is_constructible_v< MyConstant, constant_coefficient< Arg >>, int > = 0> |
constexpr | ConstantAdapter (const Arg &arg) |
| Construct from another constant object.
|
|
template<typename C , typename... Ds, std::enable_if_t< values::scalar< C > and(coordinates::pattern< Ds > and ...) and std::is_constructible_v< MyConstant, C &&> and compatible_with_vector_space_descriptor_collection< PatternMatrix, std::tuple< Ds... >>, int > = 0> |
constexpr | ConstantAdapter (C &&c, Ds &&...ds) |
| Construct using a full set of coordinates::pattern objects. More...
|
|
template<typename... Ds, std::enable_if_t<(coordinates::pattern< Ds > and ...) and values::fixed< MyConstant > and compatible_with_vector_space_descriptor_collection< PatternMatrix, std::tuple< Ds... >>, int > = 0> |
constexpr | ConstantAdapter (Ds &&...ds) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename C , typename... Ds, std::enable_if_t< values::scalar< C > and(dynamic_pattern< Ds > and ...) and pattern_tuple< DescriptorCollection > and(dynamic_index_count_v< PatternMatrix > !=dynamic_size) and(sizeof...(Ds)==dynamic_index_count_v< PatternMatrix >) and std::is_constructible_v< MyConstant, C &&>, int > = 0> |
constexpr | ConstantAdapter (C &&c, Ds &&...ds) |
| Construct using only applicable dynamic_pattern. More...
|
|
template<typename... Ds, std::enable_if_t< values::scalar< C > and(dynamic_pattern< Ds > and ...) and pattern_tuple< DescriptorCollection > and(dynamic_index_count_v< PatternMatrix > !=dynamic_size) and(sizeof...(Ds)==dynamic_index_count_v< PatternMatrix >) and values::fixed< MyConstant >, int > = 0> |
constexpr | ConstantAdapter (Ds &&...ds) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename Arg , std::enable_if_t< constant_matrix< Arg > and(not std::is_base_of_v< ConstantAdapter, Arg >) and vector_space_descriptors_may_match_with< Arg, PatternMatrix > and std::is_assignable_v< MyConstant, constant_coefficient< Arg >>, int > = 0> |
constexpr auto & | operator= (const Arg &arg) |
| Assign from a compatible constant_matrix.
|
|
template<typename Arg , std::enable_if_t< indexible< Arg >, int > = 0> |
constexpr bool | operator== (const Arg &arg) const |
| Comparison operator.
|
|
template<typename Arg , std::enable_if_t< indexible< Arg >, int > = 0> |
constexpr bool | operator!= (const Arg &arg) const |
|
template<typename Indices , std::enable_if_t< index_range_for< Indices, PatternMatrix > and(not empty_object< PatternMatrix >), int > = 0> |
constexpr auto | operator[] (const Indices &indices) const |
| Access a component at a set of indices. More...
|
|
constexpr auto | get_scalar_constant () const |
| Get the values::scalar associated with this object.
|
|
|
struct | interface::indexible_object_traits< ConstantAdapter > |
|
struct | interface::library_interface< ConstantAdapter > |
|
template<typename Arg , std::enable_if_t< indexible< Arg > and not constant_adapter< Arg >, int > = 0> |
constexpr bool | operator== (const Arg &arg, const ConstantAdapter &c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename Arg , std::enable_if_t< indexible< Arg > and not std::is_same_v< Arg, ConstantAdapter >, int > = 0> |
constexpr bool | operator!= (const Arg &arg, const ConstantAdapter &c) |
|
auto | operator- (const ConstantAdapter &arg) |
|
template<typename S , std::enable_if_t< values::scalar< S >, int > = 0> |
auto | operator* (const ConstantAdapter &arg, S s) |
|
template<typename S , std::enable_if_t< values::scalar< S >, int > = 0> |
auto | operator* (S s, const ConstantAdapter &arg) |
|
template<typename S , std::enable_if_t< values::scalar< S >, int > = 0> |
auto | operator/ (const ConstantAdapter &arg, S s) |
|
template<typename PatternMatrix, typename Scalar, auto... constant>
struct OpenKalman::ConstantAdapter< PatternMatrix, Scalar, constant >
A tensor or other matrix in which all elements are a constant scalar value.
The constant value can be static (known at compile time), or dynamic (known only at runtime). Examples:
using T = Eigen::Matrix<double, 3, 2>;
ConstantAdapter<T> c1 {3.0};
ConstantAdapter<T, int> c2 {3};
ConstantAdapter<T, int, 1> c3;
ConstantAdapter<T, double, 1> c4;
ConstantAdapter<T, std::integral_constant<int, 1>> c5;
ConstantAdapter<T, std::complex<double>> c6 {std::complex<double>{4, 5}};
ConstantAdapter<T, std::complex<double>, 4, 5> c7;
- Template Parameters
-
PatternMatrix | An indexible object reflecting the size and shape of the constant object |
Scalar | A values::number reflecting the type of the constant |
constant | Optional parameters for constructing Scalar at compile time. |