cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
declarations.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_TENSOR_DECLARATIONS_H
4#define pRC_TENSOR_TRAIN_TENSOR_DECLARATIONS_H
5
9
10namespace pRC::TensorTrain
11{
12 template<class T, IsSizes N,
13 IsSizes R = decltype(makeConstantSequence<Size, N::Dimension - 1, 1>())>
14 requires(IsValue<T> || IsComplex<T>) &&
15 (N::Dimension - 1 == R::Dimension)
16 class Tensor;
17
18 namespace TensorViews
19 {
20 template<class T, class N, class R, class F>
21 class View;
22
23 template<class T, class N, class R, class F>
24 class Assignable;
25 }
26
27 template<class T>
28 concept IsTensor = !IsReference<T> && requires {
29 {
30 []<class U, class N, class R>(Tensor<U, N, R> const &&)
31 {
32 }(std::declval<T>())
33 };
34 };
35
36 template<class T>
37 concept IsTensorView = !IsReference<T> && requires {
38 {
39 []<class U, class N, class R, class F>(
40 TensorViews::View<U, N, R, F> const &&)
41 {
42 }(std::declval<T>())
43 };
44 };
45
46 template<class T>
48}
49#endif // pRC_TENSOR_TRAIN_TENSOR_DECLARATIONS_H
Definition assignable.hpp:13
Definition declarations.hpp:21
Definition declarations.hpp:16
Definition concepts.hpp:19
Definition declarations.hpp:37
Definition declarations.hpp:28
Definition declarations.hpp:47
pRC::Float<> T
Definition externs_nonTT.hpp:1
Definition from_cores.hpp:11
Tensor(TensorViews::View< T, N, Ranks, F > const &) -> Tensor< T, N, Ranks >
static constexpr auto makeConstantSequence()
Definition sequence.hpp:444
std::size_t Size
Definition basics.hpp:31