Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Operations.hh
Go to the documentation of this file.
1 ///
2 /// @file Operations.hh
3 /// @brief Tensor operations
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
12 #ifndef HAMMER_MATH_MULTIDIM_OPERATIONS
13 #define HAMMER_MATH_MULTIDIM_OPERATIONS
14 
15 #include <complex>
16 
20 
21 namespace Hammer {
22 
23  namespace MultiDimensional {
24 
25  TensorData calcDot(TensorData origin, const IContainer& other, const IndexPairList& indices);
26  TensorData calcTrace(TensorData origin, const IndexPairList& indices);
28  TensorData sum(TensorData origin, const IContainer& other);
29  TensorData elementMultiply(TensorData origin, const IContainer& other);
30  TensorData elementDivide(TensorData origin, const IContainer& other);
31  TensorData addAt(TensorData origin, const IContainer& other, IndexType index, IndexType position);
35  TensorData read(const Serial::FBTensor* msgreader);
36  }
37 
38 } // namespace Hammer
39 
40 
41 #endif
TensorData toVector(TensorData origin)
Definition: Operations.cc:114
Forward declaration of serialization related typedefs and includes.
TensorData read(const Serial::FBTensor *msgreader)
Definition: Operations.cc:76
std::vector< IndexPair > IndexPairList
TensorData calcTrace(TensorData origin, const IndexPairList &indices)
Definition: Operations.cc:46
uint16_t IndexType
TensorData calcDot(TensorData origin, const IContainer &other, const IndexPairList &indices)
Definition: Operations.cc:41
std::unique_ptr< IContainer > TensorData
Forward declarations of types used in the tensor classes.
TensorData toSparse(TensorData origin)
Definition: Operations.cc:109
TensorData calcSquare(TensorData origin)
Definition: Operations.cc:51
TensorData elementMultiply(TensorData origin, const IContainer &other)
Definition: Operations.cc:61
TensorData addAt(TensorData origin, const IContainer &other, IndexType index, IndexType position)
Definition: Operations.cc:71
TensorData reOptimize(TensorData origin)
Definition: Operations.cc:104
TensorData elementDivide(TensorData origin, const IContainer &other)
Definition: Operations.cc:66
TensorData sum(TensorData origin, const IContainer &other)
Definition: Operations.cc:56
Tensor operations forward type declarations.