cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
zero.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_TENSOR_ZERO_H
4#define pRC_TENSOR_TRAIN_TENSOR_ZERO_H
5
10
11namespace pRC
12{
13 template<TensorTrain::IsTensor T>
14 struct Zero<T>
15 {
16 constexpr auto operator()() const
17 {
18 auto const f = []<Index C>()
19 {
21 };
22
23 using F = RemoveConstReference<decltype(f)>;
24 using N = typename T::N;
25 using Ranks = typename T::Ranks;
26
27 return TensorTrain::TensorViews::Enumerate<typename T::Type, N,
28 Ranks, F>(f);
29 }
30 };
31
32 template<TensorTrain::IsTensorView T>
33 struct Zero<T> : Zero<ResultOf<Eval, T>>
34 {
35 };
36}
37#endif // pRC_TENSOR_TRAIN_TENSOR_ZERO_H
Definition value.hpp:12
Definition enumerate.hpp:20
Definition cholesky.hpp:10
Size Index
Definition basics.hpp:32
RemoveConst< RemoveReference< T > > RemoveConstReference
Definition basics.hpp:47
static constexpr auto zero()
Definition zero.hpp:12
constexpr auto operator()() const
Definition zero.hpp:16
Definition zero.hpp:11