1#ifndef TATOOINE_TENSOR_CONCEPTS_H
2#define TATOOINE_TENSOR_CONCEPTS_H
12 { t.dimension(std::declval<std::size_t>()) } -> std::integral;
13 typename std::decay_t<T>::value_type;
28template <
typename T, std::size_t... Dimensions>
30== std::array{Dimensions...};
32template <
typename T, std::
size_t N>
35template <
typename T, std::
size_t N>
39template <
typename T, std::
size_t M, std::
size_t N>
41== M&& std::decay_t<T>::dimension(1) == N;
43template <
typename T, std::
size_t N>
47template <
typename T, std::
size_t M>
52 std::size_t I = std::decay_t<Tensor>::rank() - 1>
53requires requires {std::decay_t<Tensor>::rank() > 2;}
56 std::decay_t<Tensor>::dimension(0) == std::decay_t<Tensor>::dimension(I) &&
60template <static_tensor Tensor>
61requires requires {std::decay_t<Tensor>::rank() > 2;}
64 std::decay_t<Tensor>::dimension(0) == std::decay_t<Tensor>::dimension(1);
67template <static_tensor Tensor>
68requires requires {std::decay_t<Tensor>::rank() > 2;}
70 static auto constexpr value =
true;
73template <static_tensor Tensor>
82template <
typename T, std::
size_t N>
84 std::decay_t<T>::dimension(0)
87template <
typename T, std::
size_t N>
89 std::decay_t<T>::dimension(0)
94 std::decay_t<T>::is_transposed();
Definition: concepts.h:33
Definition: tensor_concepts.h:107
Definition: tensor_concepts.h:17
Definition: tensor_concepts.h:44
Definition: tensor_concepts.h:48
Definition: tensor_concepts.h:40
Definition: tensor_concepts.h:88
Definition: tensor_concepts.h:83
Definition: tensor_concepts.h:36
Definition: tensor_concepts.h:29
Definition: tensor_concepts.h:33
Definition: tensor_concepts.h:9
Definition: concepts.h:91
Definition: concepts.h:21
Definition: tensor_concepts.h:26
Definition: tensor_concepts.h:80
Definition: tensor_concepts.h:77
Definition: tensor_concepts.h:20
Definition: tensor_concepts.h:23
Definition: tensor_concepts.h:93
Definition: algorithm.h:6
tensor< real_number, Dimensions... > Tensor
Definition: tensor.h:184
static auto constexpr is_square
Definition: tensor_concepts.h:74
Definition: tensor_concepts.h:54
static auto constexpr value
Definition: tensor_concepts.h:55