cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
linearize.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
4#define pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
5
7
8namespace pRC
9{
10 template<class X, IsTensorish R = RemoveReference<X>>
11 requires(R::Dimension > 0)
12 static inline constexpr auto linearize(X &&a)
13 {
14 return reshape<R::Sizes::size()>(forward<X>(a));
15 }
16}
17#endif // pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
Definition cholesky.hpp:10
static constexpr auto reshape(X &&a)
Definition reshape.hpp:14
static constexpr auto linearize(X &&a)
Definition linearize.hpp:12