Go to the documentation of this file.
23 #ifndef COM_DAFER45_TBTK_HOPPING_AMPLITUDE
24 #define COM_DAFER45_TBTK_HOPPING_AMPLITUDE
30 #include <initializer_list>
91 std::complex<double> amplitude,
131 const std::string &serialization,
161 std::tuple<HoppingAmplitude, HoppingAmplitude>
operator+(
210 std::ostream &stream,
232 std::complex<double> amplitude;
247 if(amplitudeCallback){
273 if(amplitudeCallback ==
nullptr)
281 if(amplitudeCallback !=
nullptr){
282 return *amplitudeCallback;
286 "HoppingAmpliude::getAmplitudeCallback()",
287 "Tried to access AmplitudeCallback from a"
288 <<
" HoppingAmplitude without an AmplitudeCallback.",
295 std::stringstream stream;
296 stream <<
"HoppingAmplitude:\n";
297 if(amplitudeCallback ==
nullptr){
298 stream <<
"\tIs callback dependent: False\n";
299 stream <<
"\tAmplitude: " << amplitude <<
"\n";
302 stream <<
"\tIs callback dependent: True\n";
303 stream <<
"\tAmplitude: "
309 stream <<
"\tTo-Index: " << toIndex <<
"\n";
310 stream <<
"\tFrom-Index: " << fromIndex;
316 std::ostream &stream,
319 stream << hoppingAmplitude.
toString();
std::string serialize(Serializable::Mode mode) const
HermitianConjugate
Enum used to indicate the Hermitian conjugate.
Definition: HoppingAmplitude.h:37
std::string toString() const
Definition: HoppingAmplitude.h:294
Definition: HoppingAmplitude.h:57
unsigned int getSizeInBytes() const
Definition: Index.h:548
const Index & getFromIndex() const
Definition: HoppingAmplitude.h:268
virtual std::complex< double > getHoppingAmplitude(const Index &to, const Index &from) const =0
bool getIsCallbackDependent() const
Definition: HoppingAmplitude.h:272
const Index & getToIndex() const
Definition: HoppingAmplitude.h:264
Abstract base class for serializable objects.
HoppingAmplitude getHermitianConjugate() const
Hopping amplitude from state 'from' to state 'to'.
Definition: HoppingAmplitude.h:53
friend std::ostream & operator<<(std::ostream &stream, const HoppingAmplitude &hoppingAmplitude)
Definition: HoppingAmplitude.h:315
std::ostream & operator<<(std::ostream &stream, const HoppingAmplitude &hoppingAmplitude)
Definition: HoppingAmplitude.h:315
unsigned int getSizeInBytes() const
Definition: HoppingAmplitude.h:324
Mode
Definition: Serializable.h:47
Physical index.
Definition: Index.h:44
std::tuple< HoppingAmplitude, HoppingAmplitude > operator+(const HermitianConjugate hc)
Definition: HoppingAmplitude.h:258
const AmplitudeCallback & getAmplitudeCallback() const
Definition: HoppingAmplitude.h:280
std::complex< double > getAmplitude() const
Definition: HoppingAmplitude.h:246