Go to the documentation of this file.
23 #ifndef COM_DAFER45_TBTK_OVERLAP_AMPLITUDE_SET
24 #define COM_DAFER45_TBTK_OVERLAP_AMPLITUDE_SET
66 const Index &braIndex,
77 const Index &braIndex,
93 template<
bool isConstIterator>
98 typedef typename std::conditional<
102 >::type OverlapAmplitudeReferenceType;
108 OverlapAmplitudeReferenceType
operator*();
111 bool operator==(
const _Iterator &rhs);
118 typedef typename std::conditional<
122 >::type IteratorType;
125 IteratorType iterator;
128 IteratorType iteratorEnd;
137 typedef typename std::conditional<
141 >::type OverlapAmplitudeTreeType;
146 OverlapAmplitudeTreeType &overlapAmplitudeTree,
158 > &overlapAmplitudeTree,
160 ) : _Iterator(overlapAmplitudeTree,
end){};
174 > &overlapAmplitudeTree,
176 ) : _Iterator(overlapAmplitudeTree,
end){};
231 bool assumeOrthonormalBasis;
237 overlapAmplitudeTree.
add(
245 assumeOrthonormalBasis =
false;
249 const Index &braIndex,
250 const Index &ketIndex
252 return overlapAmplitudeTree.
get({braIndex, ketIndex});
256 const Index &braIndex,
257 const Index &ketIndex
259 return overlapAmplitudeTree.
get({braIndex, ketIndex});
263 return assumeOrthonormalBasis;
267 return sizeof(
this) -
sizeof(overlapAmplitudeTree)
271 template<
bool isConstIterator>
272 OverlapAmplitudeSet::_Iterator<isConstIterator>::_Iterator(
273 OverlapAmplitudeTreeType &overlapAmplitudeTree,
277 end ? overlapAmplitudeTree.end() : overlapAmplitudeTree.begin()
279 iteratorEnd(overlapAmplitudeTree.end())
283 template<
bool isConstIterator>
284 void OverlapAmplitudeSet::_Iterator<isConstIterator>::operator++(){
285 if(iterator != iteratorEnd)
289 template<
bool isConstIterator>
290 typename OverlapAmplitudeSet::_Iterator<
292 >::OverlapAmplitudeReferenceType
293 OverlapAmplitudeSet::_Iterator<isConstIterator>::operator*(){
297 template<
bool isConstIterator>
298 bool OverlapAmplitudeSet::_Iterator<isConstIterator>::operator==(
299 const _Iterator<isConstIterator> &rhs
301 if(iterator == rhs.iterator)
307 template<
bool isConstIterator>
308 bool OverlapAmplitudeSet::_Iterator<isConstIterator>::operator!=(
309 const _Iterator<isConstIterator> &rhs
311 if(iterator != rhs.iterator)
Definition: IndexedDataTree.h:45
Overlap amplitude between state 'bra' and 'ket'.
Definition: OverlapAmplitude.h:37
void add(const Data &data, const Index &index)
Definition: IndexedDataTree.h:355
unsigned int getSizeInBytes() const
Definition: IndexedDataTree.h:750
const Index & getBraIndex() const
Definition: OverlapAmplitude.h:186
void add(const OverlapAmplitude &overlapAmplitude)
Definition: OverlapAmplitudeSet.h:234
OverlapAmplitudeSet::ConstIterator cend() const
OverlapAmplitudeSet::Iterator end()
OverlapAmplitudeSet::ConstIterator cbegin() const
Definition: OverlapAmplitudeSet.h:169
Definition: IndexedDataTree.h:170
Data structure for storing data associated with an index.
bool getAssumeOrthonormalBasis() const
Definition: OverlapAmplitudeSet.h:262
const Index & getKetIndex() const
Definition: OverlapAmplitude.h:190
OverlapAmplitude & get(const Index &braIndex, const Index &ketIndex)
Definition: OverlapAmplitudeSet.h:248
bool get(Data &data, const Index &index) const
Definition: IndexedDataTree.h:467
Definition: Serializable.h:43
virtual ~OverlapAmplitudeSet()
unsigned int getSizeInBytes() const
Definition: OverlapAmplitudeSet.h:266
bool operator!=(const IndexTree &lhs, const IndexTree &rhs)
Definition: IndexTree.h:391
Abstract base class for serializable objects.
virtual std::string serialize(Mode mode) const
Definition: OverlapAmplitudeSet.h:153
Definition: IndexedDataTree.h:183
OverlapAmplitudeSet::Iterator begin()
const Vector2d operator*(double lhs, const Vector2d &rhs)
Definition: Vector2d.h:129
OverlapAmplitude container.
Definition: OverlapAmplitudeSet.h:37
Mode
Definition: Serializable.h:47
Physical index.
Definition: Index.h:44
Overlap amplitude between state 'bra' and 'ket'.