Xped
Loading...
Searching...
No Matches
Tensor.hpp
Go to the documentation of this file.
1#ifndef XPED_TENSOR_HPP_
2#define XPED_TENSOR_HPP_
3
4#include <random>
5#include <string>
6#include <vector>
7
8#include "seq/seq.h"
9
10#include "spdlog/spdlog.h"
11
12#include "yas/serialize.hpp"
13#include "yas/std_types.hpp"
14
15#include "Xped/Util/Macros.hpp"
16
17#include "Xped/Util/Bool.hpp"
19#include "Xped/Util/Mpi.hpp"
20
22#include "Xped/Core/Qbasis.hpp"
28
30#ifdef XPED_USE_AD
32#endif
33
36
37namespace Xped {
38
39template <typename, std::size_t, std::size_t, typename, bool = false, typename = HeapPolicy>
40class Tensor;
41
42template <typename Scalar_, std::size_t Rank_, std::size_t CoRank_, typename Symmetry_, typename AllocationPolicy_>
43struct TensorTraits<Tensor<Scalar_, Rank_, CoRank_, Symmetry_, false, AllocationPolicy_>>
44{
45 static constexpr std::size_t Rank = Rank_;
46 static constexpr std::size_t CoRank = CoRank_;
47 typedef Scalar_ Scalar;
48 typedef Symmetry_ Symmetry;
49 typedef typename Symmetry::qType qType;
50 using AllocationPolicy = AllocationPolicy_;
51};
52
53template <typename Scalar_, std::size_t Rank, std::size_t CoRank, typename Symmetry_, typename AllocationPolicy_>
54class Tensor<Scalar_, Rank, CoRank, Symmetry_, false, AllocationPolicy_>
55 : public TensorBase<Tensor<Scalar_, Rank, CoRank, Symmetry_, false, AllocationPolicy_>>
56{
57 template <typename Derived>
58 friend class TensorBase;
59
60 friend class Tensor<Scalar_, Rank, CoRank, Symmetry_, true, AllocationPolicy_>;
61
62public:
63 using Scalar = Scalar_;
65
66 using Symmetry = Symmetry_;
67 using qType = typename Symmetry::qType;
68
69 using AllocationPolicy = AllocationPolicy_;
70
79
80private:
82
84
85 using DictType = std::unordered_map<qType,
86 std::size_t,
87 std::hash<qType>,
88 std::equal_to<qType>,
89 typename AllocationPolicy::template Allocator<std::pair<const qType, std::size_t>>>;
90
91public:
93 Tensor() = default;
94
95 // Tensor(const Tensor& other) = default;
96 // Tensor(Tensor&& other) = default;
97
98 Tensor(const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, Rank>& basis_domain,
99 const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, CoRank>& basis_codomain,
100 const mpi::XpedWorld& world = mpi::getUniverse())
101 : storage_(basis_domain, basis_codomain, world)
102 {}
103
104 // Tensor(const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, Rank>& basis_domain,
105 // const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, CoRank>& basis_codomain,
106 // mpi::XpedWorld& world)
107 // : storage_(basis_domain, basis_codomain, world)
108 // {}
109
110 Tensor(const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, Rank>& basis_domain,
111 const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, CoRank>& basis_codomain,
112 const Scalar* data,
113 std::size_t size,
114 const mpi::XpedWorld& world)
115 : storage_(basis_domain, basis_codomain, data, size, world)
116 {}
117
118 template <typename OtherDerived>
119 inline Tensor(const TensorBase<OtherDerived>& other);
120
121 constexpr bool CONTIGUOUS_STORAGE() { return Storage::IS_CONTIGUOUS(); }
122 constexpr bool AD_TENSOR() { return false; }
123
124 static constexpr std::size_t rank() { return Rank; }
125 static constexpr std::size_t corank() { return CoRank; }
126
127 inline void set_data(const Scalar* data, std::size_t size) { storage_.set_data(data, size); }
128
129 inline const auto& sector() const { return storage_.sector(); }
130 inline const qType sector(std::size_t i) const { return storage_.sector(i); }
131
132 typename Storage::ConstMatrixReturnType block(std::size_t i) const { return storage_.block(i); }
133 typename Storage::MatrixReturnType block(std::size_t i) { return storage_.block(i); }
134
135 const Scalar* data() const
136 {
137 static_assert(Storage::IS_CONTIGUOUS());
138 return storage_.data();
139 }
141 {
142 static_assert(Storage::IS_CONTIGUOUS());
143 return storage_.data();
144 }
145
146 const std::size_t plainSize() const { return storage_.plainSize(); }
147
148 const DictType& dict() const { return storage_.dict(); }
149
150 const Storage& storage() const { return storage_; }
151 Storage& storage() { return storage_; }
152
153 const mpi::XpedWorld& world() const { return storage_.world(); }
154
155 const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, Rank>& uncoupledDomain() const { return storage_.uncoupledDomain(); }
156 const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, CoRank>& uncoupledCodomain() const { return storage_.uncoupledCodomain(); }
157
158 const Qbasis<Symmetry, Rank, AllocationPolicy>& coupledDomain() const { return storage_.coupledDomain(); }
159 const Qbasis<Symmetry, CoRank, AllocationPolicy>& coupledCodomain() const { return storage_.coupledCodomain(); }
160
161 typename Storage::ConstMatrixReturnType operator()(const qType& q_coupled) const { return storage_.block(q_coupled); }
162
163 const std::string name() const { return "Xped(" + std::to_string(rank()) + "," + std::to_string(corank()) + ")"; }
164 // Eigen::TensorMap<TensorType> operator() (const FusionTree<Rank,Symmetry>& f1, const FusionTree<CoRank,Symmetry>& f2);
165 // Eigen::TensorMap<TensorType> operator() (const FusionTree<Rank,Symmetry>& f1, const FusionTree<CoRank,Symmetry>& f2) const;
166
167 // Eigen::TensorMap<TensorType> view(const FusionTree<Rank,Symmetry>& f1, const FusionTree<CoRank,Symmetry>& f2);
168 // auto view(const FusionTree<Rank, Symmetry>& f1, const FusionTree<CoRank, Symmetry>& f2) const;
169
170 // auto view(const FusionTree<Rank, Symmetry>& f1, const FusionTree<CoRank, Symmetry>& f2, std::size_t block_number);
171
173 auto view(const FusionTree<Rank, Symmetry>& f1, const FusionTree<CoRank, Symmetry>& f2, std::size_t block_number);
174
176 auto view(const FusionTree<Rank, Symmetry>& f1, const FusionTree<CoRank, Symmetry>& f2, std::size_t block_number) const;
177
179 TensorType subBlock(const FusionTree<Rank, Symmetry>& f1, const FusionTree<CoRank, Symmetry>& f2, std::size_t block_number) const;
180
182 {
183 if(f1.q_coupled != f2.q_coupled) { assert(false); }
184
185 const auto left_offset_domain = coupledDomain().leftOffset(f1);
186 const auto left_offset_codomain = coupledCodomain().leftOffset(f2);
187 const auto it = dict().find(f1.q_coupled);
188 assert(it != dict().end());
189
190 auto submatrix = PlainInterface::block(block(it->second), left_offset_domain, left_offset_codomain, f1.dim, f2.dim);
191 // auto submatrix = block_[it->second].block(left_offset_domain, left_offset_codomain, f1.dim, f2.dim);
192 return submatrix;
193 }
194
196 {
197 assert(f1.q_coupled == f2.q_coupled and "FusionTrees needs to have the same coupled qn.");
198
199 const auto left_offset_domain = coupledDomain().leftOffset(f1);
200 const auto left_offset_codomain = coupledCodomain().leftOffset(f2);
201 const auto it = dict().find(f1.q_coupled);
202 assert(it != dict().end());
203
204 auto submatrix = PlainInterface::block(block(it->second), left_offset_domain, left_offset_codomain, f1.dim, f2.dim);
205 // auto submatrix = block_[it->second].block(left_offset_domain, left_offset_codomain, f1.dim, f2.dim);
206 return submatrix;
207 }
208
209 // MatrixType& operator() (const FusionTree<Rank,Symmetry>& f1, const FusionTree<CoRank,Symmetry>& f2);
210
211 void print(std::ostream& o, bool PRINT_MATRICES = false) const;
212
213 void setRandom(std::mt19937& engine);
214 void setZero();
217
218 void clear() { storage_.clear(); }
219
220 static Self Identity(const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, Rank>& basis_domain,
221 const std::array<Qbasis<Symmetry, 1, AllocationPolicy>, CoRank>& basis_codomain,
222 const mpi::XpedWorld& world = mpi::getUniverse())
223 {
224 Self out(basis_domain, basis_codomain, world);
225 out.setIdentity();
226 return out;
227 }
228
229 // Apply the basis transformation of domain and codomain to the block matrices to get a plain array/tensor
231 // MatrixType plainMatrix() const;
232
233 // Tensor<CoRank, Rank, Symmetry, MatrixLib_, TensorLib_> adjoint() const;
234 // AdjointTensor<self> adjoint() const;
235
236 // self conjugate() const;
237 // Tensor<CoRank, Rank, Symmetry, MatrixLib_, TensorLib_> transpose() const;
238
239 // Scalar trace() const;
240
241 // Scalar squaredNorm() const { return (*this * this->adjoint()).trace(); }
242
243 // Scalar norm() const { return std::sqrt(squaredNorm()); }
244
245 // template <bool, int shift, std::size_t...>
246 // Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute() const;
247
248 // template <bool TRACK, int shift, std::size_t... p>
249 // Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute(seq::iseq<std::size_t, p...>) const
250 // {
251 // return permute<TRACK, shift, p...>();
252 // }
253
254 // template <int shift, std::size_t... p>
255 // Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute() const
256 // {
257 // return permute<false, shift, p...>();
258 // }
259
260 template <int shift, std::size_t... p>
261 Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute() const;
262
263 template <int shift, std::size_t... p>
264 Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute(seq::iseq<std::size_t, p...>) const
265 {
266 return permute<shift, p...>();
267 }
268
269 template <int shift, std::size_t... p, bool b>
270 Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute(Bool<b>) const
271 {
272 return permute<shift, p...>();
273 }
274
275 template <int shift, std::size_t... p, bool TRACK>
276 Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute(seq::iseq<std::size_t, p...>, Bool<TRACK>) const
277 {
278 return permute<shift, p...>(Bool<TRACK>{});
279 }
280
281 template <std::size_t leg>
282 Tensor<Scalar, util::constFct::trimDim<Rank>(leg), Rank + CoRank - 1 - util::constFct::trimDim<Rank>(leg), Symmetry, false, AllocationPolicy>
283 trim() const;
284
285 template <bool = false>
286 Self twist(std::size_t leg) const;
287
288 template <std::size_t... legs>
290
291#if XPED_HAS_NTTP
292 template <auto a1,
293 auto a2,
294 std::size_t ResRank,
295 bool TRACK = false,
296 typename OtherScalar,
297 std::size_t OtherRank,
298 std::size_t OtherCoRank,
299 bool ENABLE_AD>
301 {
302 constexpr auto perms = util::constFct::get_permutations<a1, Rank, a2, OtherRank, ResRank>();
303 constexpr auto p1 = std::get<0>(perms);
304 constexpr auto shift1 = std::get<1>(perms);
305 SPDLOG_INFO("shift1={}, p1={}", shift1, p1);
306 constexpr auto p2 = std::get<2>(perms);
307 constexpr auto shift2 = std::get<3>(perms);
308 SPDLOG_INFO("shift2={}, p2={}", shift2, p2);
309 constexpr auto pres = std::get<4>(perms);
310 constexpr auto shiftres = std::get<5>(perms);
311 SPDLOG_INFO("shiftres={}, pres={}", shiftres, pres);
312 return operator*<TRACK>(this->template permute<shift1>(util::constFct::as_sequence<p1>(), Bool<TRACK>{}),
313 other.template permute<shift2>(util::constFct::as_sequence<p2>(), Bool<TRACK>{}))
314 .template permute<shiftres>(util::constFct::as_sequence<pres>(), Bool<TRACK>{});
315 }
316#endif
317
318 std::tuple<Tensor<Scalar, Rank, 1, Symmetry, false, AllocationPolicy>,
319 Tensor<RealScalar, 1, 1, Symmetry, false, AllocationPolicy>,
320 Tensor<Scalar, 1, CoRank, Symmetry, false, AllocationPolicy>>
321 tSVD(std::size_t maxKeep,
322 RealScalar eps_svd,
323 RealScalar& truncWeight,
324 RealScalar& entropy,
325 std::map<qarray<Symmetry::Nq>, VectorType>& SVspec,
326 bool PRESERVE_MULTIPLETS = true,
327 bool RETURN_SPEC = true) XPED_CONST;
328
329 std::tuple<Tensor<Scalar, Rank, 1, Symmetry, false, AllocationPolicy>,
331 Tensor<Scalar, 1, CoRank, Symmetry, false, AllocationPolicy>>
332 tSVD(std::size_t maxKeep, RealScalar eps_svd, RealScalar& truncWeight, bool PRESERVE_MULTIPLETS = true) XPED_CONST
333 {
334 RealScalar S_dumb;
335 std::map<qarray<Symmetry::Nq>, VectorType> SVspec_dumb;
336 return tSVD(maxKeep, eps_svd, truncWeight, S_dumb, SVspec_dumb, PRESERVE_MULTIPLETS, false); // false: Dont return singular value spectrum
337 }
338
339 std::pair<Tensor<Scalar, Rank, 1, Symmetry, false, AllocationPolicy>, Tensor<Scalar, 1, CoRank, Symmetry, false, AllocationPolicy>>
340 tQR(bool RETURN_LQ = false) XPED_CONST;
341
342 std::pair<Tensor<RealScalar, 1, 1, Symmetry, false, AllocationPolicy>, Tensor<RealScalar, Rank, 1, Symmetry, false, AllocationPolicy>>
343 eigh() XPED_CONST;
344
345 const auto& domainTrees(const qType& q) const { return coupledDomain().tree(q); }
346 const auto& codomainTrees(const qType& q) const { return coupledCodomain().tree(q); }
347
348 void push_back(const qType& q, const MatrixType& M) { storage_.push_back(q, M); }
349
350 auto begin() { return storage_.begin(); }
351 auto end() { return storage_.end(); }
352
353 const auto cbegin() const { return storage_.cbegin(); }
354 const auto cend() const { return storage_.cend(); }
355
356 template <typename Ar>
357 void serialize(Ar& ar)
358 {
359 ar& YAS_OBJECT_NVP("Tensor", ("storage", storage_));
360 }
361
362private:
363 Storage storage_;
364
365 template <std::size_t... p_domain, std::size_t... p_codomain>
366 Self permute_impl(seq::iseq<std::size_t, p_domain...> pd, seq::iseq<std::size_t, p_codomain...> pc) const;
367
368 template <int shift, std::size_t... ps>
369 Tensor<Scalar, Rank - shift, CoRank + shift, Symmetry, false, AllocationPolicy> permute_impl(seq::iseq<std::size_t, ps...> per) const;
370};
371
372template <typename Scalar_, std::size_t Rank, std::size_t CoRank, typename Symmetry, typename AllocationPolicy>
373template <typename OtherDerived>
374Tensor<Scalar_, Rank, CoRank, Symmetry, false, AllocationPolicy>::Tensor(const TensorBase<OtherDerived>& other)
375{
376 storage_ = Storage(other.derived().uncoupledDomain(), other.derived().uncoupledCodomain(), other.derived().world());
377 storage_.reserve(other.derived().sector().size());
378 for(std::size_t i = 0; i < other.derived().sector().size(); ++i) { storage_.push_back(other.derived().sector(i), other.derived().block(i)); }
379}
380
381template <bool TRACK = false, typename Scalar, typename OtherScalar, std::size_t Rank, std::size_t MiddleRank, std::size_t CoRank, typename Symmetry>
382Tensor<std::common_type_t<Scalar, OtherScalar>, Rank, CoRank, Symmetry, false>
385{
386 return left.template operator*<TRACK>(right);
387}
388
389template <bool TRACK = false, typename Scalar, typename OtherScalar, std::size_t Rank, std::size_t MiddleRank, std::size_t CoRank, typename Symmetry>
390Tensor<std::common_type_t<Scalar, OtherScalar>, Rank, CoRank, Symmetry, false>
392{
393 return left.template operator*<TRACK>(right);
394}
395
396#ifdef XPED_USE_AD
397template <typename Scalar, std::size_t Rank, std::size_t CoRank, typename Symmetry, bool ENABLE_AD = false>
398using ArenaTensor = Tensor<Scalar, Rank, CoRank, Symmetry, ENABLE_AD, StanArenaPolicy>;
399#endif
400
401} // namespace Xped
402
403#ifndef XPED_COMPILED_LIB
404# include "Core/Tensor.cpp"
405#endif
406
407#endif
Definition: Qbasis.hpp:39
Definition: TensorBase.hpp:36
const Qbasis< Symmetry, Rank, AllocationPolicy > & coupledDomain() const
Definition: Tensor.hpp:158
PlainInterface::MType< Scalar > MatrixType
Definition: Tensor.hpp:73
TensorType subBlock(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2) const
std::tuple< Tensor< Scalar, Rank, 1, Symmetry, false, AllocationPolicy >, Tensor< RealScalar, 1, 1, Symmetry, false, AllocationPolicy >, Tensor< Scalar, 1, CoRank, Symmetry, false, AllocationPolicy > > tSVD(std::size_t maxKeep, RealScalar eps_svd, RealScalar &truncWeight, RealScalar &entropy, std::map< qarray< Symmetry::Nq >, VectorType > &SVspec, bool PRESERVE_MULTIPLETS=true, bool RETURN_SPEC=true) XPED_CONST
PlainInterface::MapTType< Scalar, Rank+CoRank > TensorMapType
Definition: Tensor.hpp:77
PlainInterface::MapMType< Scalar > MatrixMapType
Definition: Tensor.hpp:74
auto view(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2) const
const std::size_t plainSize() const
Definition: Tensor.hpp:146
Tensor(const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, Rank > &basis_domain, const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, CoRank > &basis_codomain, const mpi::XpedWorld &world=mpi::getUniverse())
Definition: Tensor.hpp:98
Tensor< Scalar, Rank - shift, CoRank+shift, Symmetry, false, AllocationPolicy > permute(Bool< b >) const
Definition: Tensor.hpp:270
auto view(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2)
auto subMatrix(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2)
Definition: Tensor.hpp:195
std::pair< Tensor< Scalar, Rank, 1, Symmetry, false, AllocationPolicy >, Tensor< Scalar, 1, CoRank, Symmetry, false, AllocationPolicy > > tQR(bool RETURN_LQ=false) XPED_CONST
PlainInterface::Indextype IndexType
Definition: Tensor.hpp:71
void print(std::ostream &o, bool PRINT_MATRICES=false) const
PlainInterface::cMapTType< Scalar, Rank+CoRank > TensorcMapType
Definition: Tensor.hpp:78
const auto subMatrix(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2) const
Definition: Tensor.hpp:181
const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, Rank > & uncoupledDomain() const
Definition: Tensor.hpp:155
Tensor(const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, Rank > &basis_domain, const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, CoRank > &basis_codomain, const Scalar *data, std::size_t size, const mpi::XpedWorld &world)
Definition: Tensor.hpp:110
static Self Identity(const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, Rank > &basis_domain, const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, CoRank > &basis_codomain, const mpi::XpedWorld &world=mpi::getUniverse())
Definition: Tensor.hpp:220
PlainInterface::VType< Scalar > VectorType
Definition: Tensor.hpp:72
Storage::ConstMatrixReturnType operator()(const qType &q_coupled) const
Definition: Tensor.hpp:161
auto view(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2, std::size_t block_number) const
const auto & codomainTrees(const qType &q) const
Definition: Tensor.hpp:346
PlainInterface::TType< Scalar, Rank+CoRank > TensorType
Definition: Tensor.hpp:76
typename Symmetry::qType qType
Definition: Tensor.hpp:67
PlainInterface::cMapMType< Scalar > MatrixcMapType
Definition: Tensor.hpp:75
Storage::MatrixReturnType block(std::size_t i)
Definition: Tensor.hpp:133
Tensor< Scalar, Rank, CoRank, Symmetry, false, AllocationPolicy > shiftQN(std::array< qType, sizeof...(legs)> charges) const
Tensor< Scalar, util::constFct::trimDim< Rank >(leg), Rank+CoRank - 1 - util::constFct::trimDim< Rank >(leg), Symmetry, false, AllocationPolicy > trim() const
const mpi::XpedWorld & world() const
Definition: Tensor.hpp:153
const std::array< Qbasis< Symmetry, 1, AllocationPolicy >, CoRank > & uncoupledCodomain() const
Definition: Tensor.hpp:156
Tensor< Scalar, Rank - shift, CoRank+shift, Symmetry, false, AllocationPolicy > permute(seq::iseq< std::size_t, p... >) const
Definition: Tensor.hpp:264
typename ScalarTraits< Scalar >::Real RealScalar
Definition: Tensor.hpp:64
Storage::ConstMatrixReturnType block(std::size_t i) const
Definition: Tensor.hpp:132
void set_data(const Scalar *data, std::size_t size)
Definition: Tensor.hpp:127
const qType sector(std::size_t i) const
Definition: Tensor.hpp:130
const Storage & storage() const
Definition: Tensor.hpp:150
const std::string name() const
Definition: Tensor.hpp:163
static constexpr std::size_t rank()
Definition: Tensor.hpp:124
static constexpr std::size_t corank()
Definition: Tensor.hpp:125
const DictType & dict() const
Definition: Tensor.hpp:148
Tensor< Scalar, Rank - shift, CoRank+shift, Symmetry, false, AllocationPolicy > permute(seq::iseq< std::size_t, p... >, Bool< TRACK >) const
Definition: Tensor.hpp:276
auto view(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2, std::size_t block_number)
TensorType subBlock(const FusionTree< Rank, Symmetry > &f1, const FusionTree< CoRank, Symmetry > &f2, std::size_t block_number) const
void push_back(const qType &q, const MatrixType &M)
Definition: Tensor.hpp:348
const Qbasis< Symmetry, CoRank, AllocationPolicy > & coupledCodomain() const
Definition: Tensor.hpp:159
Tensor< Scalar, Rank - shift, CoRank+shift, Symmetry, false, AllocationPolicy > permute() const
Definition: Tensor.hpp:40
XpedWorld & getUniverse()
Definition: Mpi.hpp:49
Definition: bench.cpp:62
XTensor< TRACK, Scalar, Rank, CoRank, Symmetry > operator*(const Tensor< Scalar, Rank, CoRank, Symmetry, true > &t, Scalar s)
Definition: ADTensor.hpp:452
Definition: Bool.hpp:8
Definition: FusionTree.hpp:24
std::size_t dim
Definition: FusionTree.hpp:30
qType q_coupled
Definition: FusionTree.hpp:29
CTF::Matrix< Scalar > MapMType
Definition: MatrixInterface_Cyclops_impl.hpp:45
static MType< Scalar > block(const MType< Scalar > &M, const MIndextype &row_off, const MIndextype &col_off, const MIndextype &rows, const MIndextype &cols)
Definition: MatrixInterface_Cyclops_impl.cpp:287
const CTF::Matrix< Scalar > cMapMType
Definition: MatrixInterface_Cyclops_impl.hpp:47
CTF::Matrix< Scalar > MType
Definition: MatrixInterface_Cyclops_impl.hpp:40
int Indextype
Definition: PlainInterface_Cyclops_impl.hpp:11
Definition: ScalarTraits.hpp:10
Definition: StorageType_contiguous.hpp:14
MapMatrixType MatrixReturnType
Definition: StorageType_contiguous.hpp:20
cMapMatrixType ConstMatrixReturnType
Definition: StorageType_contiguous.hpp:21
nda::dense_array< Scalar, Rank > TType
Definition: TensorInterface_Array_impl.hpp:44
nda::dense_array_ref< Scalar, Rank > MapTType
Definition: TensorInterface_Array_impl.hpp:49
nda::const_dense_array_ref< Scalar, Rank > cMapTType
Definition: TensorInterface_Array_impl.hpp:51
Definition: TensorBase.hpp:10
CTF::Vector< Scalar > VType
Definition: VectorInterface_Cyclops_impl.hpp:12
Definition: Mpi.hpp:34
Definition: qarray.hpp:30