OpenKalman
to_native_matrix.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) 2022-2023 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_TO_NATIVE_MATRIX_HPP
17 #define OPENKALMAN_TO_NATIVE_MATRIX_HPP
18 
19 namespace OpenKalman
20 {
28 #ifdef __cpp_concepts
29  template<indexible LibraryObject, indexible Arg>
30  inline decltype(auto)
31  to_native_matrix(Arg&& arg)
32 #else
33  template<typename LibraryObject, typename Arg, std::enable_if_t<indexible<LibraryObject> and indexible<Arg>, int> = 0>
34  inline decltype(auto)
35  to_native_matrix(Arg&& arg)
36 #endif
37  {
38  if constexpr (interface::to_native_matrix_defined_for<LibraryObject, Arg>)
40  else
41  return internal::LibraryWrapper<Arg, LibraryObject> {std::forward<Arg>(arg)};
42  }
43 
44 } // namespace OpenKalman
45 
46 #endif //OPENKALMAN_TO_NATIVE_MATRIX_HPP
decltype(auto) to_native_matrix(Arg &&arg)
If it isn&#39;t already, convert Arg to a native object in the library associated with LibraryObject...
Definition: to_native_matrix.hpp:35
The root namespace for OpenKalman.
Definition: basics.hpp:34
An interface to various routines from the linear algebra library associated with indexible object T...
Definition: library_interface.hpp:37
Definition: forward-class-declarations.hpp:580