OpenKalman
get_reduced_vector_space_descriptor.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) 2024 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 
17 #ifndef OPENKALMAN_GET_REDUCED_VECTOR_SPACE_DESCRIPTOR_HPP
18 #define OPENKALMAN_GET_REDUCED_VECTOR_SPACE_DESCRIPTOR_HPP
19 
20 namespace OpenKalman::internal
21 {
29 #ifdef __cpp_concepts
30  template<std::size_t I, std::size_t...indices, indexible Arg>
31  constexpr coordinates::pattern auto
32 #else
33  template<std::size_t I, std::size_t...indices, typename Arg, std::enable_if_t<indexible<Arg>, int> = 0>
34  constexpr auto
35 #endif
36  get_reduced_vector_space_descriptor(const Arg& arg)
37  {
38  if constexpr ((... or (I == indices)))
39  return uniform_static_vector_space_descriptor_component_of_t<vector_space_descriptor_of_t<Arg, I>>{};
40  else
41  return get_vector_space_descriptor<I>(arg);
42  }
43 
44 } // namespace OpenKalman::internal
45 
46 #endif //OPENKALMAN_GET_REDUCED_VECTOR_SPACE_DESCRIPTOR_HPP
constexpr bool indexible
T is a generalized tensor type.
Definition: indexible.hpp:32
Definition: basics.hpp:48