OpenKalman
make_pattern_vector.hpp
Go to the documentation of this file.
1 /* This file is part of OpenKalman, a header-only C++ library for
2  * Kalman filters and other recursive filters.
3  *
4  * Copyright (c) 2025 Christopher Lee Ogden <ogden@gatech.edu>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9  */
10 
16 #ifndef OPENKALMAN_COORDINATES_MAKE_PATTERN_VECTOR_HPP
17 #define OPENKALMAN_COORDINATES_MAKE_PATTERN_VECTOR_HPP
18 
20 #include "linear-algebra/coordinates/descriptors/Any.hpp"
21 
23 {
28 #ifdef __cpp_concepts
29  template<values::value Scalar = double, descriptor...Args>
30 #else
31  template<typename Scalar = double, typename...Args, std::enable_if_t<
32  values::value<Scalar> and (... and descriptor<Args>), int> = 0>
33 #endif
34  constexpr std::vector<Any<Scalar>>
35  make_pattern_vector(Args&&...args)
36  {
37  return {static_cast<Any<Scalar>>(std::forward<Args>(args))...};
38  }
39 
40 
41 } // namespace OpenKalman::coordinates
42 
43 
44 #endif //OPENKALMAN_COORDINATES_MAKE_PATTERN_VECTOR_HPP
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
Definition: compares_with.hpp:28
constexpr bool descriptor
T is an atomic (non-separable or non-composite) grouping of coordinates::pattern objects.
Definition: descriptor.hpp:30
constexpr std::vector< Any< Scalar > > make_pattern_vector(Args &&...args)
Make a coordinates::pattern comprising a std::vector of descriptors.
Definition: make_pattern_vector.hpp:35
Definition: Any.hpp:41
Definition for ::value.