Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Hammer::MultiDimensional Namespace Reference

The MultiDimensional namespace contains the tensor algebra infrastructure. More...

Namespaces

 Ops
 The MultiDimensional namespace contains the tensor algebra algorithms.
 

Classes

class  AlignedIndexing
 
class  BinnedIndexing
 
class  OuterElemIterator
 
class  BlockIndexing
 
class  BruteForceIterator
 
class  IContainer
 
class  ISingleContainer
 
class  LabeledIndexing
 
class  OuterContainer
 
class  ScalarContainer
 
class  SequentialIndexing
 
class  SparseContainer
 
class  VectorContainer
 

Typedefs

using VTensor = VectorContainer
 
using STensor = SparseContainer
 
using OTensor = OuterContainer
 
using Base = IContainer
 
using BinValue = std::vector< double >
 
using BinEdgeList = std::vector< std::vector< double >>
 
using BinRange = std::pair< double, double >
 
using BinRangeList = std::vector< BinRange >
 
using DotGroupType = std::tuple< IndexList, IndexList, IndexPairList >
 
using DotGroupList = std::vector< DotGroupType >
 
template<class Executor >
using BinaryDispatch = Loki::StaticDoubleDispatcher< Executor, IContainer, TensorDataTypes, false, const IContainer, ConstTensorDataTypes, IContainer * >
 
template<class Executor >
using UnaryDispatch = Loki::StaticSingleDispatcher< Executor, IContainer, TensorDataTypes, IContainer * >
 
using TensorDataTypes = Loki::TypeList< VectorContainer, SparseContainer, OuterContainer >
 
using ConstTensorDataTypes = Loki::TypeList< const VectorContainer, const SparseContainer, const OuterContainer >
 
using TensorData = std::unique_ptr< IContainer >
 
using SharedTensorData = std::shared_ptr< IContainer >
 

Functions

static IndexType nextPowerOf2 (IndexType value)
 
TensorData calcDot (TensorData origin, const IContainer &other, const IndexPairList &indices)
 
TensorData calcTrace (TensorData origin, const IndexPairList &indices)
 
TensorData calcSquare (TensorData origin)
 
TensorData sum (TensorData origin, const IContainer &other)
 
TensorData elementMultiply (TensorData origin, const IContainer &other)
 
TensorData elementDivide (TensorData origin, const IContainer &other)
 
TensorData addAt (TensorData origin, const IContainer &other, IndexType index, IndexType position)
 
TensorData read (const Serial::FBTensor *msgreader)
 
TensorData reOptimize (TensorData origin)
 
TensorData toSparse (TensorData origin)
 
TensorData toVector (TensorData origin)
 
TensorData makeEmptyScalar ()
 
TensorData makeScalar (complex< double > value)
 
TensorData makeEmptySparse (const IndexList &dimensions, const LabelsList &labels)
 
TensorData makeEmptySparse (LabeledIndexing< AlignedIndexing > indexing)
 
TensorData makeEmptyVector (const IndexList &dimensions, const LabelsList &labels)
 
TensorData makeEmptyVector (LabeledIndexing< SequentialIndexing > indexing)
 
TensorData makeVector (IndexList dimensions, LabelsList labels, vector< complex< double >> values)
 
bool operator== (const OuterElemIterator &lhs, const OuterElemIterator &rhs)
 
bool operator!= (const OuterElemIterator &lhs, const OuterElemIterator &rhs)
 
bool operator== (const BruteForceIterator &lhs, const BruteForceIterator &rhs)
 
bool operator!= (const BruteForceIterator &lhs, const BruteForceIterator &rhs)
 
void next (ISingleContainer::NonZeroIt it)
 
bool operator== (const ISingleContainer::ItBase &lhs, const ISingleContainer::ItBase &rhs)
 
bool operator!= (const ISingleContainer::ItBase &lhs, const ISingleContainer::ItBase &rhs)
 
LabelsList flipListOfLabels (LabelsList labels)
 
template<class Ops , class TensorPtr >
TensorPtr calc2 (TensorPtr origin, const IContainer &other, Ops op, std::string opName)
 
template<class Ops , class TensorPtr >
TensorPtr calc1 (TensorPtr origin, Ops op, std::string opName)
 
TensorData makeOuterSquare (const TensorData &base)
 
TensorData makeOuterSquare (TensorData &&base)
 
TensorData combineTensors (const std::vector< TensorData > &base)
 
TensorData combineTensors (std::vector< TensorData > &&base)
 
TensorData combineSharedTensors (std::vector< std::pair< SharedTensorData, bool >> &&data)
 

Detailed Description

The MultiDimensional namespace contains the tensor algebra infrastructure.

Typedef Documentation

Definition at line 30 of file AddAt.cc.

Definition at line 27 of file OperationDefs.hh.

using Hammer::MultiDimensional::BinEdgeList = typedef std::vector<std::vector<double>>

Definition at line 23 of file BinnedIndexing.hh.

using Hammer::MultiDimensional::BinRange = typedef std::pair<double, double>

Definition at line 24 of file BinnedIndexing.hh.

using Hammer::MultiDimensional::BinRangeList = typedef std::vector<BinRange>

Definition at line 25 of file BinnedIndexing.hh.

using Hammer::MultiDimensional::BinValue = typedef std::vector<double>

Definition at line 22 of file BinnedIndexing.hh.

Definition at line 81 of file BlockIndexing.hh.

Definition at line 80 of file BlockIndexing.hh.

Definition at line 29 of file AddAt.cc.

using Hammer::MultiDimensional::SharedTensorData = typedef std::shared_ptr<IContainer>

Definition at line 48 of file MultiDimensional.fhh.

Definition at line 28 of file AddAt.cc.

using Hammer::MultiDimensional::TensorData = typedef std::unique_ptr<IContainer>

Definition at line 47 of file MultiDimensional.fhh.

Definition at line 29 of file OperationDefs.hh.

Definition at line 27 of file AddAt.cc.

Function Documentation

TensorData Hammer::MultiDimensional::addAt ( TensorData  origin,
const IContainer &  other,
IndexType  index,
IndexType  position 
)

Definition at line 71 of file Operations.cc.

template<class Ops , class TensorPtr >
TensorPtr Hammer::MultiDimensional::calc1 ( TensorPtr  origin,
Ops  op,
std::string  opName 
)

Definition at line 44 of file OperationDefs.hh.

template<class Ops , class TensorPtr >
TensorPtr Hammer::MultiDimensional::calc2 ( TensorPtr  origin,
const IContainer &  other,
Ops  op,
std::string  opName 
)

Definition at line 32 of file OperationDefs.hh.

TensorData Hammer::MultiDimensional::calcDot ( TensorData  origin,
const IContainer &  other,
const IndexPairList &  indices 
)

Definition at line 41 of file Operations.cc.

TensorData Hammer::MultiDimensional::calcSquare ( TensorData  origin)

Definition at line 51 of file Operations.cc.

TensorData Hammer::MultiDimensional::calcTrace ( TensorData  origin,
const IndexPairList &  indices 
)

Definition at line 46 of file Operations.cc.

TensorData Hammer::MultiDimensional::combineSharedTensors ( std::vector< std::pair< SharedTensorData, bool >> &&  data)
TensorData Hammer::MultiDimensional::combineTensors ( const std::vector< TensorData > &  base)
TensorData Hammer::MultiDimensional::combineTensors ( std::vector< TensorData > &&  base)
TensorData Hammer::MultiDimensional::elementDivide ( TensorData  origin,
const IContainer &  other 
)

Definition at line 66 of file Operations.cc.

TensorData Hammer::MultiDimensional::elementMultiply ( TensorData  origin,
const IContainer &  other 
)

Definition at line 61 of file Operations.cc.

LabelsList Hammer::MultiDimensional::flipListOfLabels ( LabelsList  labels)
inline

Definition at line 190 of file LabeledIndexingDefs.hh.

TensorData Hammer::MultiDimensional::makeEmptyScalar ( )

Definition at line 150 of file ScalarContainer.cc.

TensorData Hammer::MultiDimensional::makeEmptySparse ( const IndexList &  dimensions,
const LabelsList &  labels 
)

Definition at line 287 of file SparseContainer.cc.

TensorData Hammer::MultiDimensional::makeEmptySparse ( LabeledIndexing< AlignedIndexing >  indexing)

Definition at line 292 of file SparseContainer.cc.

TensorData Hammer::MultiDimensional::makeEmptyVector ( const IndexList &  dimensions,
const LabelsList &  labels 
)

Definition at line 297 of file VectorContainer.cc.

TensorData Hammer::MultiDimensional::makeEmptyVector ( LabeledIndexing< SequentialIndexing >  indexing)

Definition at line 302 of file VectorContainer.cc.

TensorData Hammer::MultiDimensional::makeOuterSquare ( const TensorData &  base)
TensorData Hammer::MultiDimensional::makeOuterSquare ( TensorData &&  base)
TensorData Hammer::MultiDimensional::makeScalar ( complex< double >  value)

Definition at line 155 of file ScalarContainer.cc.

TensorData Hammer::MultiDimensional::makeVector ( IndexList  dimensions,
LabelsList  labels,
vector< complex< double >>  values 
)

Definition at line 307 of file VectorContainer.cc.

void Hammer::MultiDimensional::next ( ISingleContainer::NonZeroIt  it)
inline

Definition at line 50 of file ISingleContainer.hh.

static IndexType Hammer::MultiDimensional::nextPowerOf2 ( IndexType  value)
static

Definition at line 28 of file AlignedIndexing.cc.

bool Hammer::MultiDimensional::operator!= ( const ISingleContainer::ItBase &  lhs,
const ISingleContainer::ItBase &  rhs 
)
inline

Definition at line 57 of file ISingleContainer.hh.

bool Hammer::MultiDimensional::operator!= ( const BruteForceIterator &  lhs,
const BruteForceIterator &  rhs 
)
inline

Definition at line 65 of file BruteForceIterator.hh.

bool Hammer::MultiDimensional::operator!= ( const OuterElemIterator &  lhs,
const OuterElemIterator &  rhs 
)
inline

Definition at line 75 of file BlockIndexing.hh.

bool Hammer::MultiDimensional::operator== ( const ISingleContainer::ItBase &  lhs,
const ISingleContainer::ItBase &  rhs 
)
inline

Definition at line 52 of file ISingleContainer.hh.

bool Hammer::MultiDimensional::operator== ( const BruteForceIterator &  lhs,
const BruteForceIterator &  rhs 
)
inline

Definition at line 60 of file BruteForceIterator.hh.

bool Hammer::MultiDimensional::operator== ( const OuterElemIterator &  lhs,
const OuterElemIterator &  rhs 
)
inline

Definition at line 70 of file BlockIndexing.hh.

TensorData Hammer::MultiDimensional::read ( const Serial::FBTensor *  msgreader)

Definition at line 76 of file Operations.cc.

TensorData Hammer::MultiDimensional::reOptimize ( TensorData  origin)

Definition at line 104 of file Operations.cc.

TensorData Hammer::MultiDimensional::sum ( TensorData  origin,
const IContainer &  other 
)

Definition at line 56 of file Operations.cc.

TensorData Hammer::MultiDimensional::toSparse ( TensorData  origin)

Definition at line 109 of file Operations.cc.

TensorData Hammer::MultiDimensional::toVector ( TensorData  origin)

Definition at line 114 of file Operations.cc.