Hammer
1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
|
#include <SparseContainer.hh>
Classes | |
class | ItAligned |
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 | |
SparseContainer (const IndexList &dimensions, const LabelsList &labels) | |
SparseContainer (LabeledIndexing< AlignedIndexing > indexing) | |
SparseContainer (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) |
iterator | erase (const_iterator first, const_iterator last) |
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 |
IContainer & | operator*= (double value) override |
IContainer & | operator*= (const ElementType value) override |
IContainer & | conjugate () 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 | |
ISingleContainer & | operator= (const ISingleContainer &)=default |
ISingleContainer & | operator= (ISingleContainer &&)=default |
Public Member Functions inherited from Hammer::MultiDimensional::IContainer | |
virtual | ~IContainer () |
IContainer () | |
IContainer (const IContainer &)=default | |
IContainer (IContainer &&)=default | |
IContainer & | operator= (const IContainer &)=default |
IContainer & | operator= (IContainer &&)=default |
Protected Member Functions | |
Log & | getLog () const |
logging facility More... | |
Private Types | |
using | DataType = std::map< PositionType, ElementType > |
Private Member Functions | |
const LabeledIndexing < AlignedIndexing > & | getIndexing () const |
Private Attributes | |
DataType | _data |
LabeledIndexing< AlignedIndexing > | _indexing |
Friends | |
class | Ops::Sum |
class | Ops::Multiply |
class | Ops::Divide |
class | Ops::Trace |
class | Ops::Dot |
class | Ops::AddAt |
class | Ops::Convert |
Definition at line 51 of file SparseContainer.hh.
using Hammer::MultiDimensional::SparseContainer::const_iterator = DataType::const_iterator |
Definition at line 66 of file SparseContainer.hh.
|
private |
Definition at line 53 of file SparseContainer.hh.
using Hammer::MultiDimensional::SparseContainer::iterator = DataType::iterator |
Definition at line 65 of file SparseContainer.hh.
Hammer::MultiDimensional::SparseContainer::SparseContainer | ( | const IndexList & | dimensions, |
const LabelsList & | labels | ||
) |
Definition at line 30 of file SparseContainer.cc.
Hammer::MultiDimensional::SparseContainer::SparseContainer | ( | LabeledIndexing< AlignedIndexing > | indexing | ) |
Definition at line 34 of file SparseContainer.cc.
Hammer::MultiDimensional::SparseContainer::SparseContainer | ( | const Serial::FBSingleTensor * | input | ) |
Definition at line 37 of file SparseContainer.cc.
SparseContainer::iterator Hammer::MultiDimensional::SparseContainer::begin | ( | ) |
Definition at line 88 of file SparseContainer.cc.
SparseContainer::const_iterator Hammer::MultiDimensional::SparseContainer::begin | ( | ) | const |
Definition at line 92 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 155 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 208 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 194 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 180 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 227 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 129 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 117 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 159 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 165 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 170 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 176 of file SparseContainer.cc.
SparseContainer::iterator Hammer::MultiDimensional::SparseContainer::end | ( | ) |
Definition at line 96 of file SparseContainer.cc.
SparseContainer::const_iterator Hammer::MultiDimensional::SparseContainer::end | ( | ) | const |
Definition at line 100 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::ISingleContainer.
Definition at line 204 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 133 of file SparseContainer.cc.
SparseContainer::iterator Hammer::MultiDimensional::SparseContainer::erase | ( | SparseContainer::const_iterator | first, |
SparseContainer::const_iterator | last | ||
) |
Definition at line 104 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::ISingleContainer.
Definition at line 200 of file SparseContainer.cc.
|
private |
Definition at line 283 of file SparseContainer.cc.
|
protected |
logging facility
Definition at line 279 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 142 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 147 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 151 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 121 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 137 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 125 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 212 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 219 of file SparseContainer.cc.
SparseContainer::reference Hammer::MultiDimensional::SparseContainer::operator[] | ( | PositionType | pos | ) |
Definition at line 109 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 113 of file SparseContainer.cc.
void Hammer::MultiDimensional::SparseContainer::setValue | ( | const IndexList & | indices, |
ElementType | value = 0. |
||
) |
Definition at line 74 of file SparseContainer.cc.
void Hammer::MultiDimensional::SparseContainer::setValue | ( | IndexList::const_iterator | first, |
IndexList::const_iterator | last, | ||
ElementType | value = 0. |
||
) |
Definition at line 80 of file SparseContainer.cc.
SparseContainer::ElementType Hammer::MultiDimensional::SparseContainer::value | ( | const IndexList & | indices | ) | const |
Definition at line 62 of file SparseContainer.cc.
SparseContainer::ElementType Hammer::MultiDimensional::SparseContainer::value | ( | IndexList::const_iterator | first, |
IndexList::const_iterator | last | ||
) | const |
Definition at line 68 of file SparseContainer.cc.
|
overridevirtual |
Implements Hammer::MultiDimensional::IContainer.
Definition at line 235 of file SparseContainer.cc.
|
friend |
Definition at line 144 of file SparseContainer.hh.
|
friend |
Definition at line 145 of file SparseContainer.hh.
|
friend |
Definition at line 141 of file SparseContainer.hh.
|
friend |
Definition at line 143 of file SparseContainer.hh.
|
friend |
Definition at line 140 of file SparseContainer.hh.
|
friend |
Definition at line 139 of file SparseContainer.hh.
|
friend |
Definition at line 142 of file SparseContainer.hh.
|
mutableprivate |
Definition at line 151 of file SparseContainer.hh.
|
private |
Definition at line 152 of file SparseContainer.hh.