|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/utility/time_pt.hpp>
A point in imaginary time, \( \tau_n \in [0, \beta] \), stored on a very fine integer grid.
Each time point is identified by an integer position \( n \in [0, N_\mathrm{max}] \) of type uint64_t and the inverse temperature \( \beta \). Its floating-point value is \( \beta * n / N_\mathrm{max} \).
Comparing two time points reduces to integer comparison, which avoids the well-known pitfalls of floating-point equality.
Various arithmetic operations are defined between time points and between time points and scalar double values.
Definition at line 60 of file time_pt.hpp.
Public Member Functions | |
| time_pt ()=default | |
| Default constructor creates the point \( \tau_0 \) for \( \beta = 0 \). | |
| time_pt (uint64_t n_, double beta_) | |
| Construct a point \( \tau_n \) from an integer grid position and the inverse temperature. | |
| operator double () const | |
| Explicit cast of \( \tau_n \) to the corresponding double value. | |
| auto | operator<=> (time_pt const &tp) const |
| Three-way comparison operator compares the integer grid positions of two time points. | |
| time_pt & | operator= (double v)=delete |
| Assigning a double is deleted to avoid accidental loss of precision. | |
| bool | operator== (time_pt const &tp) const |
| Equal-to operator compares the integer grid positions of two time points. | |
Static Public Member Functions | |
| static std::string | hdf5_format () |
| Get the HDF5 format tag. | |
Static Public Attributes | |
| static constexpr uint64_t | Nmax = std::numeric_limits<uint64_t>::max() |
| Largest possible grid position. | |
Friends | |
| time_pt | div_by_int (time_pt const &tp, size_t a) |
| Divide a time point by an integer. | |
| size_t | floor_div (time_pt const &tp1, time_pt const &tp2) |
| Perform floor division between two time points. | |
| void | h5_read (h5::group g, std::string const &name, time_pt &tp) |
| Read a time_pt from HDF5. | |
| void | h5_write (h5::group g, std::string const &name, time_pt const &tp) |
| Write a time_pt to HDF5. | |
| time_pt | mult_by_int (time_pt const &tp, size_t a) |
| Multiply a time point by an integer. | |
| time_pt | operator+ (time_pt const &tp1, time_pt const &tp2) |
| Addiditon operator performs cyclic addition on \( [0, \beta] \). | |
| time_pt | operator- (time_pt const &tp) |
| Unary minus operator performs cyclic negation \( [0, \beta] \). | |
| time_pt | operator- (time_pt const &tp1, time_pt const &tp2) |
| Subtraction operator performs cyclic subtraction on \( [0, \beta] \). | |
| std::ostream & | operator<< (std::ostream &out, time_pt const &p) |
| Write a time_pt to an output stream. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| double | operator* (time_pt const &tp1, time_pt const &tp2) |
| Multiplication between two time points. | |
| double | operator/ (time_pt const &tp1, time_pt const &tp2) |
| Division between two time points. | |
|
inline |
Construct a point \( \tau_n \) from an integer grid position and the inverse temperature.
| n_ | Integer position \( n \in [0, N_\text{max}] \) on the grid. |
| beta_ | Inverse temperature \( \beta \). |
Definition at line 75 of file time_pt.hpp.
|
inlineexplicit |
Explicit cast of \( \tau_n \) to the corresponding double value.
Definition at line 162 of file time_pt.hpp.
|
inline |
Three-way comparison operator compares the integer grid positions of two time points.
| tp | Right-hand side time point. |
Definition at line 86 of file time_pt.hpp.
|
inline |
Equal-to operator compares the integer grid positions of two time points.
| tp | Right-hand side time point. |
Definition at line 94 of file time_pt.hpp.
Divide a time point by an integer.
| tp | Time point \( \tau_n \). |
| a | Integer divisor \( a \). |
Definition at line 138 of file time_pt.hpp.
Perform floor division between two time points.
| tp1 | Left-hand side time point \( \tau_l \). |
| tp2 | Right-hand side time point \( \tau_r \). |
Definition at line 156 of file time_pt.hpp.
|
friend |
Read a time_pt from HDF5.
| g | h5::group to be read from. |
| name | Name of the subgroup. |
| tp | Time point to read into. |
Definition at line 203 of file time_pt.hpp.
|
friend |
Write a time_pt to HDF5.
| g | h5::group to be written to. |
| name | Name of the subgroup. |
| tp | Time point to be written. |
Definition at line 188 of file time_pt.hpp.
Multiply a time point by an integer.
| tp | Time point \( \tau_n \). |
| a | Integer factor \( a \). |
Definition at line 147 of file time_pt.hpp.
Addiditon operator performs cyclic addition on \( [0, \beta] \).
| tp1 | Left-hand side operand \( \tau_l \). |
| tp2 | Right-hand side operand \( \tau_r \). |
Definition at line 103 of file time_pt.hpp.
Unary minus operator performs cyclic negation \( [0, \beta] \).
| tp | Time point \( \tau_n \) to negate. |
Definition at line 129 of file time_pt.hpp.
Subtraction operator performs cyclic subtraction on \( [0, \beta] \).
| tp1 | Left-hand side operand \( \tau_l \). |
| tp2 | Right-hand side operand \( \tau_r \). |
Definition at line 118 of file time_pt.hpp.
|
friend |
Write a time_pt to an output stream.
| out | Output stream to write to. |
| p | Point to print. |
Definition at line 171 of file time_pt.hpp.