pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
mean.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_MEAN_H
4#define pRC_CORE_VALUE_FUNCTIONS_MEAN_H
5
11
12namespace pRC
13{
21 template<class... Xs, If<IsInvocable<Fold<Add>, Xs...>> = 0>
22 static inline constexpr auto mean(Xs &&...args)
23 {
25 return fold<Add>(forward<Xs>(args)...) /
27 }
28}
29#endif // pRC_CORE_VALUE_FUNCTIONS_MEAN_H
Definition cholesky.hpp:18
static constexpr auto mean(Xs &&...args)
Calculates the mean of a variable ammount of pRC objects.
Definition mean.hpp:22
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
RemoveConst< RemoveReference< T > > RemoveConstReference
Definition type_traits.hpp:62