Hammer
1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
|
#include <LabeledIndexing.hh>
Public Member Functions | |
LabeledIndexing () | |
LabeledIndexing (IndexList dimensions, LabelsList labels) | |
LabeledIndexing (const LabeledIndexing &)=default | |
LabeledIndexing (LabeledIndexing &&)=default | |
LabeledIndexing & | operator= (const LabeledIndexing &)=default |
LabeledIndexing & | operator= (LabeledIndexing &&)=default |
~LabeledIndexing ()=default | |
IndexType | dim (IndexLabel label) const |
dimension of a specific component by label. More... | |
const LabelsList & | labels () const |
get the labels of all the indices at once More... | |
UniqueLabelsList | spinIndices () const |
returns only the labels corresponding to spin indices More... | |
IndexPairList | getSameLabelPairs (const LabelsList &otherLabels, const UniqueLabelsList &indices, bool sortedBySecond=true) const |
returns the position of the indices in the two tensor (this and another) that can be contracted together, given a set of allowed index labels More... | |
IndexPairList | getOppositeLabelPairs (const UniqueLabelsList &indices) const |
returns the position of the indices that can be traced together, given a set of allowed index labels More... | |
IndexType | labelIndex (IndexLabel label) const |
bool | isSameLabelShape (const LabelsList &otherLabels, const IndexList &otherIndices) const |
template<typename S > | |
bool | isSameLabelShape (const LabeledIndexing< S > &other) const |
bool | canAddAt (const LabelsList &otherLabels, const IndexList &otherIndices, IndexLabel coord, IndexType position) const |
void | flipLabels () |
Protected Member Functions | |
UniqueLabelsList | sameIndices (const LabelsList &otherLabels) const |
returns the set of indices of this tensor that can be contracted using dot with those of another given tensor More... | |
LabelPairsSet | oppositeIndices () const |
returns the pairs of indices that can be traced over. More... | |
Private Attributes | |
LabelsList | _labels |
the labels of each tensor index More... | |
Definition at line 23 of file LabeledIndexing.hh.
Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::LabeledIndexing | ( | ) |
Definition at line 55 of file LabeledIndexingDefs.hh.
Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::LabeledIndexing | ( | IndexList | dimensions, |
LabelsList | labels | ||
) |
Definition at line 60 of file LabeledIndexingDefs.hh.
|
default |
|
default |
|
default |
bool Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::canAddAt | ( | const LabelsList & | otherLabels, |
const IndexList & | otherIndices, | ||
IndexLabel | coord, | ||
IndexType | position | ||
) | const |
Definition at line 170 of file LabeledIndexingDefs.hh.
IndexType Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::dim | ( | IndexLabel | label | ) | const |
dimension of a specific component by label.
If multiple components with the same label exists, returns the dimension of first (they should all be the same by consistency)
[in] | label | the component label |
Definition at line 28 of file LabeledIndexingDefs.hh.
void Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::flipLabels | ( | ) |
Definition at line 186 of file LabeledIndexingDefs.hh.
IndexPairList Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::getOppositeLabelPairs | ( | const UniqueLabelsList & | indices | ) | const |
returns the position of the indices that can be traced together, given a set of allowed index labels
[in] | indices | the list of labels of the allowed indices to be traced |
Definition at line 128 of file LabeledIndexingDefs.hh.
IndexPairList Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::getSameLabelPairs | ( | const LabelsList & | otherLabels, |
const UniqueLabelsList & | indices, | ||
bool | sortedBySecond = true |
||
) | const |
returns the position of the indices in the two tensor (this and another) that can be contracted together, given a set of allowed index labels
[in] | otherLabels | the list of labels of the other tensor |
[in] | indices | the list of labels of the allowed indices to be contracted |
[in] | sortedBySecond | whether the result should be sorted according to the second element of the pair |
Definition at line 94 of file LabeledIndexingDefs.hh.
bool Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::isSameLabelShape | ( | const LabelsList & | otherLabels, |
const IndexList & | otherIndices | ||
) | const |
Definition at line 145 of file LabeledIndexingDefs.hh.
bool Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::isSameLabelShape | ( | const LabeledIndexing< S > & | other | ) | const |
Definition at line 155 of file LabeledIndexingDefs.hh.
IndexType Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::labelIndex | ( | IndexLabel | label | ) | const |
Definition at line 163 of file LabeledIndexingDefs.hh.
const LabelsList & Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::labels | ( | ) | const |
get the labels of all the indices at once
Definition at line 39 of file LabeledIndexingDefs.hh.
|
default |
|
default |
|
protected |
returns the pairs of indices that can be traced over.
Valid pairs are composed by opposite sign labels which correspond to (reference) spin indices
Definition at line 80 of file LabeledIndexingDefs.hh.
|
protected |
returns the set of indices of this tensor that can be contracted using dot with those of another given tensor
[in] | otherLabels | the other tensor |
Definition at line 69 of file LabeledIndexingDefs.hh.
UniqueLabelsList Hammer::MultiDimensional::LabeledIndexing< BasicIndexing >::spinIndices | ( | ) | const |
returns only the labels corresponding to spin indices
Definition at line 44 of file LabeledIndexingDefs.hh.
|
private |
the labels of each tensor index
Definition at line 101 of file LabeledIndexing.hh.