OpenKalman
diagonal_adapter.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) 2019-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 
16 #ifndef OPENKALMAN_DIAGONAL_ADAPTER_HPP
17 #define OPENKALMAN_DIAGONAL_ADAPTER_HPP
18 
19 
20 namespace OpenKalman
21 {
22 #ifndef __cpp_concepts
23  namespace detail
24  {
25  template<typename T, std::size_t N, typename = void>
26  struct nested_is_vector : std::false_type {};
27 
28  template<typename T, std::size_t N>
29  struct nested_is_vector<T, N, std::enable_if_t<has_nested_object<T>>>
30  : std::bool_constant<vector<nested_object_of_t<T>, N>> {};
31  } // namespace detail
32 #endif
33 
34 
42  template<typename T, std::size_t N = 0>
43 #ifdef __cpp_concepts
44  concept diagonal_adapter = interface::indexible_object_traits<std::decay_t<T>>::template is_triangular<TriangleType::diagonal> and
45  vector<nested_object_of_t<T>, N>;
46 #else
48 #endif
49 
50 
51 } // namespace OpenKalman
52 
53 #endif //OPENKALMAN_DIAGONAL_ADAPTER_HPP
Definition: square_shaped.hpp:58
Definition: indexible_object_traits.hpp:36
constexpr bool diagonal_adapter
Specifies that a type is a diagonal matrix adapter.
Definition: diagonal_adapter.hpp:47
Definition: tuple_reverse.hpp:103
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition: diagonal_adapter.hpp:26