Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Trace.hh
Go to the documentation of this file.
1 ///
2 /// @file Trace.hh
3 /// @brief Tensor trace algorithm
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_OPS_TRACE
13 #define HAMMER_MATH_MULTIDIM_OPS_TRACE
14 
16 
17 namespace Hammer {
18 
19 
20  namespace MultiDimensional {
21 
22  class IContainer;
23  class VectorContainer;
24  class SparseContainer;
25  class OuterContainer;
26 
27  namespace Ops {
28 
29  class Trace final {
30  public:
31  Trace(const IndexPairList& indices);
32 
36 
38 
39  private:
40  std::pair<IndexList, LabelsList> getNewIndexLabels(const IContainer& original) const;
41  IndexList reducedIndex(const IndexList& a) const;
42 
45  };
46 
47  } // namespace Ops
48 
49  } // namespace MultiDimensional
50 
51 } // namespace Hammer
52 
53 
54 #endif
std::vector< IndexPair > IndexPairList
IContainer * error(IContainer &)
Definition: Trace.cc:184
IndexList reducedIndex(const IndexList &a) const
Definition: Trace.cc:198
IContainer * operator()(VectorContainer &first)
Definition: Trace.cc:77
Forward declarations of types used in the tensor classes.
std::vector< IndexType > IndexList
Trace(const IndexPairList &indices)
Definition: Trace.cc:39
std::set< IndexType > UniqueIndexList
std::pair< IndexList, LabelsList > getNewIndexLabels(const IContainer &original) const
Definition: Trace.cc:188