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::OuterContainer Class Referencefinal

#include <OuterContainer.hh>

+ Inheritance diagram for Hammer::MultiDimensional::OuterContainer:
+ Collaboration diagram for Hammer::MultiDimensional::OuterContainer:

Public Types

using iterator = DataType::iterator
 
using const_iterator = DataType::const_iterator
 
- Public Types inherited from Hammer::MultiDimensional::IContainer
using ElementType = std::complex< double >
 
using reference = ElementType &
 
using const_reference = const ElementType &
 
using SerialType = std::pair< flatbuffers::Offset< void >, Serial::FBTensorTypes >
 

Public Member Functions

 OuterContainer (TensorData left, TensorData right)
 
 OuterContainer (TensorData toBeSquared, bool conjugate=true)
 
 OuterContainer (std::vector< TensorData > &&group)
 
 OuterContainer (EntryType &&data)
 
 OuterContainer (SharedTensorData toBeSquared, bool conjugate=true)
 
 OuterContainer (const Serial::FBTensorList *input)
 
 OuterContainer (const OuterContainer &other)
 
OuterContaineroperator= (const OuterContainer &other)
 
 OuterContainer (OuterContainer &&other)=default
 
OuterContaineroperator= (OuterContainer &&other)=default
 
 ~OuterContainer () override=default
 
ElementType value (const IndexList &indices) const
 
ElementType value (IndexList::const_iterator first, IndexList::const_iterator last) const
 
ElementType value (const std::vector< IndexList > &indices) const
 
size_t numAddends () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
size_t rank () const override
 
IndexList dims () const override
 
LabelsList labels () const override
 
size_t numValues () const override
 
size_t dataSize () const override
 
size_t entrySize () const override
 
IndexType labelToIndex (IndexLabel label) const override
 
IndexPairList getSameLabelPairs (const IContainer &other, const UniqueLabelsList &indices) const override
 
IndexPairList getSpinLabelPairs () const override
 
bool isSameShape (const IContainer &other) const override
 
bool canAddAt (const IContainer &subContainer, IndexLabel coord, IndexType position) const override
 
reference element (const IndexList &coords={}) override
 
ElementType element (const IndexList &coords={}) const override
 
reference element (IndexList::const_iterator start, IndexList::const_iterator end) override
 
ElementType element (IndexList::const_iterator start, IndexList::const_iterator end) const override
 
bool compare (const IContainer &other) const override
 
TensorData clone () const override
 
void clear () override
 
IContaineroperator*= (double value) override
 
IContaineroperator*= (const ElementType value) override
 
IContainerconjugate () override
 
SerialType write (flatbuffers::FlatBufferBuilder *msgwriter) const override
 
- Public Member Functions inherited from Hammer::MultiDimensional::IContainer
virtual ~IContainer ()
 
 IContainer ()
 
 IContainer (const IContainer &)=default
 
 IContainer (IContainer &&)=default
 
IContaineroperator= (const IContainer &)=default
 
IContaineroperator= (IContainer &&)=default
 

Protected Member Functions

LoggetLog () const
 logging facility More...
 
std::set< IContainer * > getUniquePtrs (bool decoupleConjugates=false)
 
std::set< IContainer * > getUniquePtrs (size_t pos, bool decoupleConjugates=false)
 
void swapElement (IContainer *oldContainer, TensorData newContainer)
 
bool shouldBeEvaluated () const
 

Private Types

using EntryType = OuterElemIterator::EntryType
 
using DataType = std::vector< EntryType >
 

Private Member Functions

 OuterContainer ()
 
const BlockIndexinggetIndexing () const
 
void swap (DataType values)
 
void swapIndexing (BlockIndexing values)
 
void reserve (size_t numTerms)
 
void addTerm (std::vector< std::pair< SharedTensorData, bool >> tensorsAndConjFlags)
 
bool isDataShared () const
 
bool isOuterSquare () const
 

Private Attributes

DataType _data
 
BlockIndexing _indexing
 
bool _sharedData
 
std::vector< std::function
< ElementType(const IndexList
&, IContainer *)> > 
_accessors
 

Friends

class Ops::Sum
 
class Ops::Multiply
 
class Ops::Divide
 
class Ops::OuterSquare
 
class Ops::Dot
 
class Ops::Optimize
 
class Ops::Trace
 
class Ops::Convert
 

Detailed Description

Definition at line 49 of file OuterContainer.hh.

Member Typedef Documentation

Definition at line 82 of file OuterContainer.hh.

Definition at line 52 of file OuterContainer.hh.

Definition at line 81 of file OuterContainer.hh.

Constructor & Destructor Documentation

Hammer::MultiDimensional::OuterContainer::OuterContainer ( )
private

Definition at line 35 of file OuterContainer.cc.

Hammer::MultiDimensional::OuterContainer::OuterContainer ( TensorData  left,
TensorData  right 
)

Definition at line 72 of file OuterContainer.cc.

Hammer::MultiDimensional::OuterContainer::OuterContainer ( TensorData  toBeSquared,
bool  conjugate = true 
)
Hammer::MultiDimensional::OuterContainer::OuterContainer ( std::vector< TensorData > &&  group)
Hammer::MultiDimensional::OuterContainer::OuterContainer ( EntryType &&  data)
Hammer::MultiDimensional::OuterContainer::OuterContainer ( SharedTensorData  toBeSquared,
bool  conjugate = true 
)
Hammer::MultiDimensional::OuterContainer::OuterContainer ( const Serial::FBTensorList *  input)
Hammer::MultiDimensional::OuterContainer::OuterContainer ( const OuterContainer other)

Definition at line 37 of file OuterContainer.cc.

Hammer::MultiDimensional::OuterContainer::OuterContainer ( OuterContainer &&  other)
default
Hammer::MultiDimensional::OuterContainer::~OuterContainer ( )
overridedefault

Member Function Documentation

void Hammer::MultiDimensional::OuterContainer::addTerm ( std::vector< std::pair< SharedTensorData, bool >>  tensorsAndConjFlags)
private
iterator Hammer::MultiDimensional::OuterContainer::begin ( )
const_iterator Hammer::MultiDimensional::OuterContainer::begin ( ) const
bool Hammer::MultiDimensional::OuterContainer::canAddAt ( const IContainer subContainer,
IndexLabel  coord,
IndexType  position 
) const
overridevirtual
void Hammer::MultiDimensional::OuterContainer::clear ( )
overridevirtual
TensorData Hammer::MultiDimensional::OuterContainer::clone ( ) const
overridevirtual
bool Hammer::MultiDimensional::OuterContainer::compare ( const IContainer other) const
overridevirtual
IContainer& Hammer::MultiDimensional::OuterContainer::conjugate ( )
overridevirtual
size_t Hammer::MultiDimensional::OuterContainer::dataSize ( ) const
overridevirtual
IndexList Hammer::MultiDimensional::OuterContainer::dims ( ) const
overridevirtual
reference Hammer::MultiDimensional::OuterContainer::element ( const IndexList coords = {})
overridevirtual
ElementType Hammer::MultiDimensional::OuterContainer::element ( const IndexList coords = {}) const
overridevirtual
reference Hammer::MultiDimensional::OuterContainer::element ( IndexList::const_iterator  start,
IndexList::const_iterator  end 
)
overridevirtual
ElementType Hammer::MultiDimensional::OuterContainer::element ( IndexList::const_iterator  start,
IndexList::const_iterator  end 
) const
overridevirtual
iterator Hammer::MultiDimensional::OuterContainer::end ( )
const_iterator Hammer::MultiDimensional::OuterContainer::end ( ) const
size_t Hammer::MultiDimensional::OuterContainer::entrySize ( ) const
overridevirtual
const BlockIndexing& Hammer::MultiDimensional::OuterContainer::getIndexing ( ) const
private
Log& Hammer::MultiDimensional::OuterContainer::getLog ( ) const
protected

logging facility

Returns
stream to be used for logging
IndexPairList Hammer::MultiDimensional::OuterContainer::getSameLabelPairs ( const IContainer other,
const UniqueLabelsList indices 
) const
overridevirtual
IndexPairList Hammer::MultiDimensional::OuterContainer::getSpinLabelPairs ( ) const
overridevirtual
std::set<IContainer*> Hammer::MultiDimensional::OuterContainer::getUniquePtrs ( bool  decoupleConjugates = false)
protected
std::set<IContainer*> Hammer::MultiDimensional::OuterContainer::getUniquePtrs ( size_t  pos,
bool  decoupleConjugates = false 
)
protected
bool Hammer::MultiDimensional::OuterContainer::isDataShared ( ) const
private
bool Hammer::MultiDimensional::OuterContainer::isOuterSquare ( ) const
private
bool Hammer::MultiDimensional::OuterContainer::isSameShape ( const IContainer other) const
overridevirtual
LabelsList Hammer::MultiDimensional::OuterContainer::labels ( ) const
overridevirtual
IndexType Hammer::MultiDimensional::OuterContainer::labelToIndex ( IndexLabel  label) const
overridevirtual
size_t Hammer::MultiDimensional::OuterContainer::numAddends ( ) const
size_t Hammer::MultiDimensional::OuterContainer::numValues ( ) const
overridevirtual
IContainer& Hammer::MultiDimensional::OuterContainer::operator*= ( double  value)
overridevirtual
IContainer& Hammer::MultiDimensional::OuterContainer::operator*= ( const ElementType  value)
overridevirtual
OuterContainer & Hammer::MultiDimensional::OuterContainer::operator= ( const OuterContainer other)

Definition at line 54 of file OuterContainer.cc.

OuterContainer& Hammer::MultiDimensional::OuterContainer::operator= ( OuterContainer &&  other)
default
size_t Hammer::MultiDimensional::OuterContainer::rank ( ) const
overridevirtual
void Hammer::MultiDimensional::OuterContainer::reserve ( size_t  numTerms)
private
bool Hammer::MultiDimensional::OuterContainer::shouldBeEvaluated ( ) const
protected
void Hammer::MultiDimensional::OuterContainer::swap ( DataType  values)
private
void Hammer::MultiDimensional::OuterContainer::swapElement ( IContainer oldContainer,
TensorData  newContainer 
)
protected
void Hammer::MultiDimensional::OuterContainer::swapIndexing ( BlockIndexing  values)
private
ElementType Hammer::MultiDimensional::OuterContainer::value ( const IndexList indices) const
ElementType Hammer::MultiDimensional::OuterContainer::value ( IndexList::const_iterator  first,
IndexList::const_iterator  last 
) const
ElementType Hammer::MultiDimensional::OuterContainer::value ( const std::vector< IndexList > &  indices) const
SerialType Hammer::MultiDimensional::OuterContainer::write ( flatbuffers::FlatBufferBuilder *  msgwriter) const
overridevirtual

Friends And Related Function Documentation

friend class Ops::Convert
friend

Definition at line 147 of file OuterContainer.hh.

friend class Ops::Divide
friend

Definition at line 142 of file OuterContainer.hh.

friend class Ops::Dot
friend

Definition at line 144 of file OuterContainer.hh.

friend class Ops::Multiply
friend

Definition at line 141 of file OuterContainer.hh.

friend class Ops::Optimize
friend

Definition at line 145 of file OuterContainer.hh.

friend class Ops::OuterSquare
friend

Definition at line 143 of file OuterContainer.hh.

friend class Ops::Sum
friend

Definition at line 140 of file OuterContainer.hh.

friend class Ops::Trace
friend

Definition at line 146 of file OuterContainer.hh.

Member Data Documentation

std::vector<std::function<ElementType(const IndexList&, IContainer*)> > Hammer::MultiDimensional::OuterContainer::_accessors
private

Definition at line 162 of file OuterContainer.hh.

DataType Hammer::MultiDimensional::OuterContainer::_data
mutableprivate

Definition at line 159 of file OuterContainer.hh.

BlockIndexing Hammer::MultiDimensional::OuterContainer::_indexing
private

Definition at line 160 of file OuterContainer.hh.

bool Hammer::MultiDimensional::OuterContainer::_sharedData
private

Definition at line 161 of file OuterContainer.hh.


The documentation for this class was generated from the following files: