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

#include <VectorContainer.hh>

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

Classes

class  ItSequential
 

Public Types

using iterator = DataType::iterator
 
using const_iterator = DataType::const_iterator
 
- Public Types inherited from Hammer::MultiDimensional::ISingleContainer
using NonZeroIt = std::unique_ptr< ItBase >
 
- 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

 VectorContainer (const IndexList &dimensions, const LabelsList &labels)
 
 VectorContainer (LabeledIndexing< SequentialIndexing > indexing)
 
 VectorContainer (const Serial::FBSingleTensor *input)
 
ElementType value (const IndexList &indices) const
 
ElementType value (IndexList::const_iterator first, IndexList::const_iterator last) const
 
void setValue (const IndexList &indices, ElementType value=0.)
 
void setValue (IndexList::const_iterator first, IndexList::const_iterator last, ElementType value=0.)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (PositionType pos)
 
const_reference operator[] (PositionType pos) 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
 
NonZeroIt firstNonZero () const override
 
NonZeroIt endNonZero () const override
 
- Public Member Functions inherited from Hammer::MultiDimensional::ISingleContainer
virtual ~ISingleContainer ()
 
 ISingleContainer ()
 
 ISingleContainer (const ISingleContainer &)=default
 
 ISingleContainer (ISingleContainer &&)=default
 
ISingleContaineroperator= (const ISingleContainer &)=default
 
ISingleContaineroperator= (ISingleContainer &&)=default
 
- 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...
 

Private Types

using DataType = std::vector< ElementType >
 

Private Member Functions

const LabeledIndexing
< SequentialIndexing > & 
getIndexing () const
 
void swap (std::vector< std::complex< double >> &values)
 

Private Attributes

DataType _data
 
LabeledIndexing
< SequentialIndexing
_indexing
 

Friends

class Ops::Trace
 
class Ops::Dot
 
class Ops::AddAt
 
class Ops::Convert
 
TensorData makeVector (IndexList, LabelsList, std::vector< std::complex< double >>)
 

Detailed Description

Definition at line 48 of file VectorContainer.hh.

Member Typedef Documentation

Definition at line 64 of file VectorContainer.hh.

Definition at line 50 of file VectorContainer.hh.

Definition at line 63 of file VectorContainer.hh.

Constructor & Destructor Documentation

Hammer::MultiDimensional::VectorContainer::VectorContainer ( const IndexList dimensions,
const LabelsList labels 
)

Definition at line 30 of file VectorContainer.cc.

Hammer::MultiDimensional::VectorContainer::VectorContainer ( LabeledIndexing< SequentialIndexing indexing)

Definition at line 35 of file VectorContainer.cc.

Hammer::MultiDimensional::VectorContainer::VectorContainer ( const Serial::FBSingleTensor *  input)

Definition at line 39 of file VectorContainer.cc.

Member Function Documentation

VectorContainer::iterator Hammer::MultiDimensional::VectorContainer::begin ( )

Definition at line 94 of file VectorContainer.cc.

VectorContainer::const_iterator Hammer::MultiDimensional::VectorContainer::begin ( ) const

Definition at line 98 of file VectorContainer.cc.

bool Hammer::MultiDimensional::VectorContainer::canAddAt ( const IContainer subContainer,
IndexLabel  coord,
IndexType  position 
) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 161 of file VectorContainer.cc.

void Hammer::MultiDimensional::VectorContainer::clear ( )
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 89 of file VectorContainer.cc.

TensorData Hammer::MultiDimensional::VectorContainer::clone ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 203 of file VectorContainer.cc.

bool Hammer::MultiDimensional::VectorContainer::compare ( const IContainer other) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 187 of file VectorContainer.cc.

IContainer & Hammer::MultiDimensional::VectorContainer::conjugate ( )
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 232 of file VectorContainer.cc.

size_t Hammer::MultiDimensional::VectorContainer::dataSize ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 134 of file VectorContainer.cc.

IndexList Hammer::MultiDimensional::VectorContainer::dims ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 122 of file VectorContainer.cc.

VectorContainer::reference Hammer::MultiDimensional::VectorContainer::element ( const IndexList coords = {})
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 166 of file VectorContainer.cc.

VectorContainer::ElementType Hammer::MultiDimensional::VectorContainer::element ( const IndexList coords = {}) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 172 of file VectorContainer.cc.

VectorContainer::reference Hammer::MultiDimensional::VectorContainer::element ( IndexList::const_iterator  start,
IndexList::const_iterator  end 
)
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 177 of file VectorContainer.cc.

VectorContainer::ElementType Hammer::MultiDimensional::VectorContainer::element ( IndexList::const_iterator  start,
IndexList::const_iterator  end 
) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 183 of file VectorContainer.cc.

VectorContainer::iterator Hammer::MultiDimensional::VectorContainer::end ( )

Definition at line 102 of file VectorContainer.cc.

VectorContainer::const_iterator Hammer::MultiDimensional::VectorContainer::end ( ) const

Definition at line 106 of file VectorContainer.cc.

ISingleContainer::NonZeroIt Hammer::MultiDimensional::VectorContainer::endNonZero ( ) const
overridevirtual

Implements Hammer::MultiDimensional::ISingleContainer.

Definition at line 213 of file VectorContainer.cc.

size_t Hammer::MultiDimensional::VectorContainer::entrySize ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 139 of file VectorContainer.cc.

ISingleContainer::NonZeroIt Hammer::MultiDimensional::VectorContainer::firstNonZero ( ) const
overridevirtual

Implements Hammer::MultiDimensional::ISingleContainer.

Definition at line 208 of file VectorContainer.cc.

const LabeledIndexing< SequentialIndexing > & Hammer::MultiDimensional::VectorContainer::getIndexing ( ) const
private

Definition at line 288 of file VectorContainer.cc.

Log & Hammer::MultiDimensional::VectorContainer::getLog ( ) const
protected

logging facility

Returns
stream to be used for logging

Definition at line 284 of file VectorContainer.cc.

IndexPairList Hammer::MultiDimensional::VectorContainer::getSameLabelPairs ( const IContainer other,
const UniqueLabelsList indices 
) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 148 of file VectorContainer.cc.

IndexPairList Hammer::MultiDimensional::VectorContainer::getSpinLabelPairs ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 153 of file VectorContainer.cc.

bool Hammer::MultiDimensional::VectorContainer::isSameShape ( const IContainer other) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 157 of file VectorContainer.cc.

LabelsList Hammer::MultiDimensional::VectorContainer::labels ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 126 of file VectorContainer.cc.

IndexType Hammer::MultiDimensional::VectorContainer::labelToIndex ( IndexLabel  label) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 143 of file VectorContainer.cc.

size_t Hammer::MultiDimensional::VectorContainer::numValues ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 130 of file VectorContainer.cc.

IContainer & Hammer::MultiDimensional::VectorContainer::operator*= ( double  value)
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 218 of file VectorContainer.cc.

IContainer & Hammer::MultiDimensional::VectorContainer::operator*= ( const ElementType  value)
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 225 of file VectorContainer.cc.

VectorContainer::reference Hammer::MultiDimensional::VectorContainer::operator[] ( PositionType  pos)

Definition at line 110 of file VectorContainer.cc.

VectorContainer::const_reference Hammer::MultiDimensional::VectorContainer::operator[] ( PositionType  pos) const

Definition at line 114 of file VectorContainer.cc.

size_t Hammer::MultiDimensional::VectorContainer::rank ( ) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 118 of file VectorContainer.cc.

void Hammer::MultiDimensional::VectorContainer::setValue ( const IndexList indices,
ElementType  value = 0. 
)

Definition at line 76 of file VectorContainer.cc.

void Hammer::MultiDimensional::VectorContainer::setValue ( IndexList::const_iterator  first,
IndexList::const_iterator  last,
ElementType  value = 0. 
)

Definition at line 82 of file VectorContainer.cc.

void Hammer::MultiDimensional::VectorContainer::swap ( std::vector< std::complex< double >> &  values)
private

Definition at line 292 of file VectorContainer.cc.

VectorContainer::ElementType Hammer::MultiDimensional::VectorContainer::value ( const IndexList indices) const

Definition at line 65 of file VectorContainer.cc.

VectorContainer::ElementType Hammer::MultiDimensional::VectorContainer::value ( IndexList::const_iterator  first,
IndexList::const_iterator  last 
) const

Definition at line 71 of file VectorContainer.cc.

VectorContainer::SerialType Hammer::MultiDimensional::VectorContainer::write ( flatbuffers::FlatBufferBuilder *  msgwriter) const
overridevirtual

Implements Hammer::MultiDimensional::IContainer.

Definition at line 240 of file VectorContainer.cc.

Friends And Related Function Documentation

TensorData makeVector ( IndexList  ,
LabelsList  ,
std::vector< std::complex< double >>   
)
friend

Definition at line 307 of file VectorContainer.cc.

friend class Ops::AddAt
friend

Definition at line 142 of file VectorContainer.hh.

friend class Ops::Convert
friend

Definition at line 143 of file VectorContainer.hh.

friend class Ops::Dot
friend

Definition at line 141 of file VectorContainer.hh.

friend class Ops::Trace
friend

Definition at line 140 of file VectorContainer.hh.

Member Data Documentation

DataType Hammer::MultiDimensional::VectorContainer::_data
mutableprivate

Definition at line 156 of file VectorContainer.hh.

LabeledIndexing<SequentialIndexing> Hammer::MultiDimensional::VectorContainer::_indexing
private

Definition at line 157 of file VectorContainer.hh.


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