16 #ifndef OPENKALMAN_FORWARD_CLASS_DECLARATIONS_HPP 17 #define OPENKALMAN_FORWARD_CLASS_DECLARATIONS_HPP 19 #include <type_traits> 21 #include "basics/traits/traits.hpp" 49 template<indexible PatternMatrix, values::scalar Scalar = scalar_type_of_t<PatternMatrix>, auto...constant>
50 requires (
sizeof...(constant) == 0) or requires { Scalar {constant...}; }
52 template<
typename PatternMatrix,
typename Scalar = scalar_type_of_t<PatternMatrix>, auto...constant>
54 struct ConstantAdapter;
66 template<
typename PatternMatrix,
typename Scalar,
auto...constant>
91 template<indexible PatternObject, values::number Scalar = scalar_type_of_t<PatternObject>>
93 template<
typename PatternObject,
typename Scalar = scalar_type_of_t<PatternObject>>
106 #ifdef __cpp_concepts 109 template<
typename T,
typename =
void>
113 template<
typename PatternMatrix,
typename Scalar,
auto...constant>
117 #ifdef __cpp_concepts 118 template<has_nested_
object T>
144 #ifdef __cpp_concepts 145 template<vector<0, Applicability::permitted> NestedMatrix>
147 template<
typename NestedMatrix>
159 template<
typename NestedMatrix>
168 #ifdef __cpp_concepts 193 #ifdef __cpp_concepts 194 template<square_shaped<Applicability::permitted> NestedMatrix, HermitianAdapterType storage_triangle =
195 triangular_matrix<NestedMatrix, TriangleType::diagonal> ? HermitianAdapterType::lower :
196 triangular_matrix<NestedMatrix, TriangleType::upper> ? HermitianAdapterType::upper : HermitianAdapterType::lower> requires
197 (index_count_v<NestedMatrix> <= 2) and
217 template<
typename NestedMatrix, HermitianAdapterType storage_triangle>
226 #ifdef __cpp_concepts 247 #ifdef __cpp_concepts 249 square_shaped<Applicability::permitted> NestedMatrix,
252 requires (index_count_v<NestedMatrix> <= 2)
254 template<
typename NestedMatrix, TriangleType triangle_type = (diagonal_matrix<NestedMatrix> ? TriangleType::diagonal :
255 (triangular_matrix<NestedMatrix, TriangleType::upper> ? TriangleType::upper : TriangleType::lower))>
267 template<
typename NestedMatrix, TriangleType triangle_type>
276 #ifdef __cpp_concepts 294 #ifdef __cpp_concepts 295 template<indexible NestedObject, pattern_collection Descriptors>
296 requires internal::not_more_fixed_than<NestedObject, Descriptors> and (not internal::less_fixed_than<NestedObject, Descriptors>) and
297 internal::maybe_same_shape_as_vector_space_descriptors<NestedObject, Descriptors>
299 template<
typename NestedObject,
typename Descriptors>
310 template<
typename NestedObject,
typename Descriptors>
320 #ifdef __cpp_concepts 321 concept vector_space_adapter =
323 constexpr
bool vector_space_adapter =
340 #ifdef __cpp_concepts 341 template<indexible NestedObject, coordinates::pattern RowDescriptor> requires
344 template<
typename NestedMatrix,
typename RowDescriptor>
354 template<
typename NestedMatrix,
typename D>
363 #ifdef __cpp_concepts 379 #ifdef __cpp_concepts 380 template<indexible NestedObject> requires (not from_euclidean_expr<NestedObject>)
382 template<
typename NestedObject>
392 template<
typename NestedObject>
401 #ifdef __cpp_concepts 412 #ifdef __cpp_concepts 413 concept
euclidean_expr = to_euclidean_expr<T> or from_euclidean_expr<T>;
415 constexpr
bool euclidean_expr = from_euclidean_expr<T> or to_euclidean_expr<T>;
438 #ifdef __cpp_concepts 439 template<fixed_pattern RowCoefficients, fixed_pattern ColumnCoefficients, typed_matrix_nestable NestedMatrix>
440 requires (coordinates::dimension_of_v<RowCoefficients> == index_dimension_of_v<NestedMatrix, 0>) and
441 (coordinates::dimension_of_v<ColumnCoefficients> == index_dimension_of_v<NestedMatrix, 1>) and
442 (not std::is_rvalue_reference_v<NestedMatrix>) and
443 (dynamic_pattern<RowCoefficients> == dynamic_dimension<NestedMatrix, 0>) and
444 (dynamic_pattern<ColumnCoefficients> == dynamic_dimension<NestedMatrix, 1>)
446 template<
typename RowCoefficients,
typename ColumnCoefficients,
typename NestedMatrix>
453 template<
typename RowCoefficients,
typename ColumnCoefficients,
typename NestedMatrix>
454 struct is_matrix<
Matrix<RowCoefficients, ColumnCoefficients, NestedMatrix>> : std::true_type {};
470 #ifdef __cpp_concepts 471 template<fixed_pattern Descriptor, typed_matrix_nestable NestedMatrix> requires
472 (coordinates::dimension_of_v<Descriptor> == index_dimension_of_v<NestedMatrix, 0>) and
473 (not std::is_rvalue_reference_v<NestedMatrix>)
475 template<
typename Descriptor,
typename NestedMatrix>
482 template<
typename Descriptor,
typename NestedMatrix>
483 struct is_mean<
Mean<Descriptor, NestedMatrix>> : std::true_type {};
499 #ifdef __cpp_concepts 500 template<fixed_pattern Descriptor, typed_matrix_nestable NestedMatrix> requires
501 (coordinates::stat_dimension_of_v<Descriptor> == index_dimension_of_v<NestedMatrix, 0>) and (not std::is_rvalue_reference_v<NestedMatrix>)
503 template<
typename Descriptor,
typename NestedMatrix>
510 template<
typename Descriptor,
typename NestedMatrix>
524 #ifdef __cpp_concepts 525 template<fixed_pattern Descriptor, covariance_nestable NestedMatrix> requires
526 (coordinates::dimension_of_v<Descriptor> == index_dimension_of_v<NestedMatrix, 0>) and
527 (not std::is_rvalue_reference_v<NestedMatrix>) and values::number<scalar_type_of_t<NestedMatrix>>
529 template<
typename Descriptor,
typename NestedMatrix>
536 template<
typename Descriptor,
typename NestedMatrix>
552 #ifdef __cpp_concepts 553 template<fixed_pattern Descriptor, covariance_nestable NestedMatrix> requires
554 (coordinates::dimension_of_v<Descriptor> == index_dimension_of_v<NestedMatrix, 0>) and
555 (not std::is_rvalue_reference_v<NestedMatrix>) and values::number<scalar_type_of_t<NestedMatrix>>
557 template<
typename Descriptor,
typename NestedMatrix>
575 #ifdef __cpp_concepts 576 template<indexible NestedObject, indexible LibraryObject>
578 template<
typename NestedObject,
typename LibraryObject>
588 template<
typename N,
typename L>
598 #ifdef __cpp_concepts 599 concept library_wrapper =
601 constexpr
bool library_wrapper =
613 #ifdef __cpp_concepts 614 template<indexible NestedObject, pattern_tuple Descriptors> requires
615 compatible_with_vector_space_descriptor_collection<NestedObject, Descriptors> and
616 internal::not_more_fixed_than<NestedObject, Descriptors> and internal::less_fixed_than<NestedObject, Descriptors>
618 template<
typename NestedObject,
typename Descriptors>
628 template<
typename NestedMatrix,
typename Descriptors>
638 #ifdef __cpp_concepts 639 concept fixed_size_adapter =
641 constexpr
bool fixed_size_adapter =
646 template<
typename Descriptor,
typename NestedMatrix>
660 #ifdef __cpp_concepts 662 fixed_pattern Descriptor,
665 std::uniform_random_bit_generator random_number_engine = std::mt19937> requires
666 (index_dimension_of_v<MeanNestedMatrix, 0> == index_dimension_of_v<CovarianceNestedMatrix, 0>) and
667 (index_dimension_of_v<MeanNestedMatrix, 1> == 1) and
673 typename MeanNestedMatrix,
674 typename CovarianceNestedMatrix,
675 typename random_number_engine = std::mt19937>
682 template<
typename Descriptor,
typename MeanNestedMatrix,
typename CovarianceNestedMatrix,
typename re>
689 #endif //OPENKALMAN_FORWARD_CLASS_DECLARATIONS_HPP typename nested_object_of< T >::type nested_object_of_t
Helper type for nested_object_of.
Definition: nested_object_of.hpp:66
A hermitian matrix wrapper.
Definition: HermitianAdapter.hpp:31
An adapter that adds vector space descriptors for each index.
Definition: forward-class-declarations.hpp:301
TriangleType
The type of a triangular matrix.
Definition: global-definitions.hpp:60
typename pattern_matrix_of< std::decay_t< T > >::type pattern_matrix_of_t
Helper template for pattern_matrix_of.
Definition: forward-class-declarations.hpp:130
constexpr bool constant_matrix
Specifies that all components of an object are the same constant value.
Definition: constant_matrix.hpp:31
Definition: forward-class-declarations.hpp:157
constexpr bool to_euclidean_expr
Specifies that T is an expression converting coefficients to Euclidean space (i.e., ToEuclideanExpr).
Definition: forward-class-declarations.hpp:404
An expression that transforms angular or other modular vector space descriptors back from Euclidean s...
Definition: FromEuclideanExpr.hpp:29
The native matrix on which an OpenKalman matrix adapter is patterned.
Definition: forward-class-declarations.hpp:111
constexpr bool euclidean_expr
Specifies that T is either to_euclidean_expr or from_euclidean_expr.
Definition: forward-class-declarations.hpp:415
A set of one or more column vectors, each representing a statistical mean.
Definition: forward-class-declarations.hpp:477
typename scalar_type_of< T >::type scalar_type_of_t
helper template for scalar_type_of.
Definition: scalar_type_of.hpp:54
A triangular_adapter, where components above or below the diagonal (or both) are zero.
Definition: forward-class-declarations.hpp:257
Definition: tuple_reverse.hpp:103
HermitianAdapterType
The type of a hermitian adapter, indicating which triangle of the nested matrix is used...
Definition: global-definitions.hpp:78
constexpr bool not_complex
T is a values::value in which either its type is not a values::complex or its imaginary component is ...
Definition: not_complex.hpp:47
Definition: forward-class-declarations.hpp:265
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
constexpr bool constant_diagonal_matrix
Specifies that all diagonal elements of a diagonal object are the same constant value.
Definition: constant_diagonal_matrix.hpp:34
An upper-right triangular matrix.
Definition: object-types.hpp:121
Definition: object-types.hpp:29
Definition: forward-class-declarations.hpp:586
constexpr bool triangular_matrix
Specifies that a type is a triangular matrix (upper, lower, or diagonal).
Definition: triangular_matrix.hpp:37
Definition: object-types.hpp:172
The constant associated with T, assuming T is a constant_matrix.
Definition: constant_coefficient.hpp:36
Definition: object-types.hpp:64
constexpr bool hermitian_expr
Specifies that T is a self-adjoint matrix based on the Eigen library (i.e., HermitianAdapter).
Definition: forward-class-declarations.hpp:229
The upper or lower triangle Cholesky factor (square root) of a covariance matrix. ...
Definition: forward-class-declarations.hpp:559
A Gaussian distribution, defined in terms of a Mean and a Covariance.
Definition: GaussianDistribution.hpp:42
constexpr bool typed_matrix_nestable
Specifies a type that is nestable in a general typed matrix (e.g., matrix, mean, or euclidean_mean) ...
Definition: object-types.hpp:253
Similar to a Mean, but the coefficients are transformed into Euclidean space, based on their type...
Definition: EuclideanMean.hpp:29
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr bool from_euclidean_expr
Specifies that T is an expression converting coefficients from Euclidean space (i.e., FromEuclideanExpr).
Definition: forward-class-declarations.hpp:366
The concept, trait, or restraint is permitted, but whether it applies is not necessarily known at com...
The constant associated with T, assuming T is a constant_diagonal_matrix.
Definition: constant_diagonal_coefficient.hpp:32
An expression that transforms vector space descriptors into Euclidean space for application of direct...
Definition: forward-class-declarations.hpp:384
constexpr bool diagonal_expr
Specifies that T is a diagonal matrix based on the Eigen library (i.e., DiaginalMatrix).
Definition: forward-class-declarations.hpp:171
Definition: forward-class-declarations.hpp:215
Definition: FixedSizeAdapter.hpp:28
Definition: forward-class-declarations.hpp:626
constexpr bool constant_adapter
Specifies that T is a ConstantAdapter.
Definition: forward-class-declarations.hpp:78
A structure representing the dimensions associated with of a particular index.
Definition: Dimensions.hpp:42
A self-adjoint Covariance matrix.
Definition: Covariance.hpp:30
A diagonal matrix (both a lower-left and an upper-right triangular matrix).
A tensor or other matrix in which all elements are a constant scalar value.
Definition: ConstantAdapter.hpp:34
constexpr bool triangular_expr
Specifies that T is a triangular matrix based on the Eigen library (i.e., TriangularAdapter).
Definition: forward-class-declarations.hpp:279
A generalization of std::equal_to in which the arguments may be of different types.
Definition: equal_to.hpp:29
Definition: forward-class-declarations.hpp:352
Definition: forward-class-declarations.hpp:390
Definition: forward-class-declarations.hpp:308
constexpr bool covariance_nestable
T is an acceptable nested matrix for a covariance (including triangular_covariance).
Definition: object-types.hpp:237
Definition: forward-class-declarations.hpp:64
An adapter for creating a diagonal matrix or tensor.
Definition: DiagonalAdapter.hpp:27
Definition: object-types.hpp:139
Definition: forward-class-declarations.hpp:580
A lower-left triangular matrix.
Definition: object-types.hpp:99
A matrix with typed rows and columns.
Definition: forward-class-declarations.hpp:448