![]() |
Hammer
1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
|
#include <BlockIndexing.hh>
Collaboration diagram for Hammer::MultiDimensional::BlockIndexing:Public Member Functions | |
| BlockIndexing () | |
| BlockIndexing (const std::vector< IndexList > &dims, const std::vector< LabelsList > &labels) | |
| BlockIndexing (LabeledIndexing< AlignedIndexing > left, LabeledIndexing< AlignedIndexing > right) | |
| BlockIndexing (const BlockIndexing &)=default | |
| BlockIndexing (BlockIndexing &&)=default | |
| BlockIndexing & | operator= (const BlockIndexing &)=default |
| BlockIndexing & | operator= (BlockIndexing &&)=default |
| ~BlockIndexing ()=default | |
| size_t | rank () const |
| rank of the tensor More... | |
| IndexType | dim (IndexType index) const |
| dimension of a specific component More... | |
| IndexType | dim (IndexLabel label) const |
| dimension of a specific component by label. More... | |
| 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... | |
| IndexList | dims () const |
| get the dimensions of all the indices at once More... | |
| PositionType | numValues () const |
| the number of elements (product of all the dimensions) More... | |
| std::vector< IndexList > | splitIndices (const IndexList &indices) const |
| std::vector < IndexList::const_iterator > | splitIndices (IndexList::const_iterator first, IndexList::const_iterator last) const |
| bool | checkValidIndices (const IndexList &indices) const |
| check that the indices are within range for each component More... | |
| bool | checkValidIndices (IndexList::const_iterator first, IndexList::const_iterator last) const |
| bool | checkValidIndices (const std::vector< IndexList > &splits) const |
| 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 | isSameLabelShape (const BlockIndexing &other, bool includeBlockShapes=false) const |
| void | flipLabels () |
| IndexPair | getElementIndex (IndexType position) const |
| const LabeledIndexing < AlignedIndexing > & | getSubIndexing (IndexType position) const |
| size_t | numSubIndexing () const |
| size_t | maxSubRank () const |
| std::vector< std::tuple < IndexList, std::vector< bool > , PositionType > > | processShifts (const DotGroupList &chunks, IndexPairMember which) const |
| PositionType | splitPosition (const OuterElemIterator ¤tPosition, const DotGroupType &chunk, const IndexList &outerShiftsInnerPositions, const std::vector< bool > &isOuter, IndexList &innerList, std::vector< bool > &innerAdded, bool shouldCompare=false) const |
| PositionType | buildFullPosition (const OuterElemIterator ¤t, const IndexList &chunkIndices) const |
Private Member Functions | |
| void | calc () |
Private Attributes | |
| std::vector< LabeledIndexing < AlignedIndexing > > | _subIndexing |
| std::vector< IndexType > | _splitIndices |
| std::vector< PositionType > | _splitPads |
| LabeledIndexing< AlignedIndexing > | _globalIndexing |
Definition at line 83 of file BlockIndexing.hh.
| Hammer::MultiDimensional::BlockIndexing::BlockIndexing | ( | ) |
Definition at line 28 of file BlockIndexing.cc.
| Hammer::MultiDimensional::BlockIndexing::BlockIndexing | ( | const std::vector< IndexList > & | dims, |
| const std::vector< LabelsList > & | labels | ||
| ) |
Definition at line 32 of file BlockIndexing.cc.
| Hammer::MultiDimensional::BlockIndexing::BlockIndexing | ( | LabeledIndexing< AlignedIndexing > | left, |
| LabeledIndexing< AlignedIndexing > | right | ||
| ) |
Definition at line 41 of file BlockIndexing.cc.
|
default |
|
default |
|
default |
| PositionType Hammer::MultiDimensional::BlockIndexing::buildFullPosition | ( | const OuterElemIterator & | current, |
| const IndexList & | chunkIndices | ||
| ) | const |
Definition at line 269 of file BlockIndexing.cc.
|
private |
Definition at line 183 of file BlockIndexing.cc.
| bool Hammer::MultiDimensional::BlockIndexing::checkValidIndices | ( | const IndexList & | indices | ) | const |
check that the indices are within range for each component
| [in] | indices | the element indices |
Definition at line 85 of file BlockIndexing.cc.
| bool Hammer::MultiDimensional::BlockIndexing::checkValidIndices | ( | IndexList::const_iterator | first, |
| IndexList::const_iterator | last | ||
| ) | const |
Definition at line 89 of file BlockIndexing.cc.
| bool Hammer::MultiDimensional::BlockIndexing::checkValidIndices | ( | const std::vector< IndexList > & | splits | ) | const |
Definition at line 93 of file BlockIndexing.cc.
dimension of a specific component
| [in] | index | the component index |
Definition at line 50 of file BlockIndexing.cc.
| IndexType Hammer::MultiDimensional::BlockIndexing::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 60 of file BlockIndexing.cc.
| IndexList Hammer::MultiDimensional::BlockIndexing::dims | ( | ) | const |
get the dimensions of all the indices at once
Definition at line 69 of file BlockIndexing.cc.
| void Hammer::MultiDimensional::BlockIndexing::flipLabels | ( | ) |
Definition at line 211 of file BlockIndexing.cc.
Definition at line 169 of file BlockIndexing.cc.
| IndexPairList Hammer::MultiDimensional::BlockIndexing::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 140 of file BlockIndexing.cc.
| IndexPairList Hammer::MultiDimensional::BlockIndexing::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 129 of file BlockIndexing.cc.
| const LabeledIndexing< AlignedIndexing > & Hammer::MultiDimensional::BlockIndexing::getSubIndexing | ( | IndexType | position | ) | const |
Definition at line 175 of file BlockIndexing.cc.
| bool Hammer::MultiDimensional::BlockIndexing::isSameLabelShape | ( | const LabelsList & | otherLabels, |
| const IndexList & | otherIndices | ||
| ) | const |
Definition at line 148 of file BlockIndexing.cc.
| bool Hammer::MultiDimensional::BlockIndexing::isSameLabelShape | ( | const LabeledIndexing< S > & | other | ) | const |
Definition at line 199 of file BlockIndexing.hh.
| bool Hammer::MultiDimensional::BlockIndexing::isSameLabelShape | ( | const BlockIndexing & | other, |
| bool | includeBlockShapes = false |
||
| ) | const |
Definition at line 152 of file BlockIndexing.cc.
| IndexType Hammer::MultiDimensional::BlockIndexing::labelIndex | ( | IndexLabel | label | ) | const |
Definition at line 144 of file BlockIndexing.cc.
| LabelsList Hammer::MultiDimensional::BlockIndexing::labels | ( | ) | const |
get the labels of all the indices at once
Definition at line 73 of file BlockIndexing.cc.
| size_t Hammer::MultiDimensional::BlockIndexing::maxSubRank | ( | ) | const |
Definition at line 134 of file BlockIndexing.cc.
| size_t Hammer::MultiDimensional::BlockIndexing::numSubIndexing | ( | ) | const |
Definition at line 179 of file BlockIndexing.cc.
| PositionType Hammer::MultiDimensional::BlockIndexing::numValues | ( | ) | const |
the number of elements (product of all the dimensions)
Definition at line 81 of file BlockIndexing.cc.
|
default |
|
default |
| vector< tuple< IndexList, vector< bool >, PositionType > > Hammer::MultiDimensional::BlockIndexing::processShifts | ( | const DotGroupList & | chunks, |
| IndexPairMember | which | ||
| ) | const |
Definition at line 218 of file BlockIndexing.cc.
| size_t Hammer::MultiDimensional::BlockIndexing::rank | ( | ) | const |
| UniqueLabelsList Hammer::MultiDimensional::BlockIndexing::spinIndices | ( | ) | const |
returns only the labels corresponding to spin indices
Definition at line 77 of file BlockIndexing.cc.
| vector< IndexList > Hammer::MultiDimensional::BlockIndexing::splitIndices | ( | const IndexList & | indices | ) | const |
Definition at line 103 of file BlockIndexing.cc.
| vector< IndexList::const_iterator > Hammer::MultiDimensional::BlockIndexing::splitIndices | ( | IndexList::const_iterator | first, |
| IndexList::const_iterator | last | ||
| ) | const |
Definition at line 116 of file BlockIndexing.cc.
| PositionType Hammer::MultiDimensional::BlockIndexing::splitPosition | ( | const OuterElemIterator & | currentPosition, |
| const DotGroupType & | chunk, | ||
| const IndexList & | outerShiftsInnerPositions, | ||
| const std::vector< bool > & | isOuter, | ||
| IndexList & | innerList, | ||
| std::vector< bool > & | innerAdded, | ||
| bool | shouldCompare = false |
||
| ) | const |
Definition at line 259 of file BlockIndexing.cc.
|
private |
Definition at line 194 of file BlockIndexing.hh.
|
private |
Definition at line 192 of file BlockIndexing.hh.
|
private |
Definition at line 193 of file BlockIndexing.hh.
|
private |
Definition at line 191 of file BlockIndexing.hh.