Go to the documentation of this file.
16 #ifndef POMEROL_INCLUDE_POMEROL_MISC_HPP
17 #define POMEROL_INCLUDE_POMEROL_MISC_HPP
21 #include <libcommute/algebra_ids.hpp>
22 #include <libcommute/loperator/loperator.hpp>
23 #include <libcommute/loperator/state_vector.hpp>
26 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
29 #include <Eigen/Sparse>
31 #ifdef POMEROL_USE_OPENMP
35 #if __cplusplus >= 201402L
36 #define POMEROL_DEPRECATED [[deprecated]]
38 #define POMEROL_DEPRECATED
45 #include <type_traits>
54 #define MSG_PREFIX __FILE__ << ":" << __LINE__ << ": "
57 #define DEBUG(MSG) std::cout << MSG_PREFIX << MSG << '\n'
62 #define INFO(MSG) std::cout << MSG << '\n'
64 #define INFO_NONEWLINE(MSG) std::cout << MSG
66 #define ERROR(MSG) std::cerr << MSG_PREFIX << MSG << '\n'
82 Eigen::Matrix<ComplexType, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign | Eigen::RowMajor>;
86 template <
bool Complex>
using MelemType =
typename std::conditional<Complex, ComplexType, RealType>::type;
90 template <
typename ScalarType>
91 using LOperatorType = libcommute::loperator<ScalarType, libcommute::fermion, libcommute::boson>;
95 template <
bool Complex>
96 using LOperatorTypeRC = libcommute::loperator<MelemType<Complex>, libcommute::fermion, libcommute::boson>;
100 template <
bool Complex>
102 Eigen::Matrix<MelemType<Complex>, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign | Eigen::RowMajor>;
107 using RealVectorType = Eigen::Matrix<RealType, Eigen::Dynamic, 1, Eigen::AutoAlign>;
111 template <
bool Complex>
using VectorType = Eigen::Matrix<MelemType<Complex>, Eigen::Dynamic, 1, Eigen::AutoAlign>;
115 template <
bool Complex>
using ColMajorMatrixType = Eigen::SparseMatrix<MelemType<Complex>, Eigen::ColMajor>;
118 template <
bool Complex>
using RowMajorMatrixType = Eigen::SparseMatrix<MelemType<Complex>, Eigen::RowMajor>;
126 std::array<std::size_t, 3>
const perm;
144 std::array<std::size_t, 4>
const perm;
179 #endif // #ifndef POMEROL_INCLUDE_POMEROL_MISC_HPP
Eigen::Matrix< ComplexType, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign|Eigen::RowMajor > ComplexMatrixType
Dense complex matrix.
const std::array< Permutation3, 6 > permutations3
An array of all 3! = 6 permutations of 3 elements.
libcommute::sv_index_type QuantumState
Index of a many-body state.
std::ostream & operator<<(std::ostream &os, Channel channel)
const std::array< std::size_t, 4 > perm
A permuted list of integers (0, 1, 2, 3)
libcommute::loperator< ScalarType, libcommute::fermion, libcommute::boson > LOperatorType
Eigen::Matrix< MelemType< Complex >, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign|Eigen::RowMajor > MatrixType
bool operator==(Permutation3 const &rhs) const
libcommute::loperator< MelemType< Complex >, libcommute::fermion, libcommute::boson > LOperatorTypeRC
static const ComplexType I
Imaginary unit .
Eigen::SparseMatrix< MelemType< Complex >, Eigen::RowMajor > RowMajorMatrixType
std::size_t hash_binned_real(double x, double bin_size)
const int sign
Signature of the permutation.
Eigen::Matrix< RealType, Eigen::Dynamic, 1, Eigen::AutoAlign > RealVectorType
Dense real vector.
Channel
Channel, in which a susceptibility function is defined.
Eigen::Matrix< MelemType< Complex >, Eigen::Dynamic, 1, Eigen::AutoAlign > VectorType
@ xPH
Crossed particle-hole channel.
std::complex< double > ComplexType
Complex floating point type.
double RealType
Real floating point type.
bool operator==(Permutation4 const &rhs) const
const int sign
Signature of the permutation.
Eigen::SparseMatrix< MelemType< Complex >, Eigen::ColMajor > ColMajorMatrixType
const std::array< std::size_t, 3 > perm
A permuted list of integers (0, 1, 2)
@ PH
Particle-hole channel.
Permutation of 3 elements.
friend std::ostream & operator<<(std::ostream &os, Permutation4 const &p)
bool operator!=(Permutation3 const &rhs) const
Eigen::Matrix< ComplexType, Eigen::Dynamic, 1, Eigen::AutoAlign > ComplexVectorType
Dense complex vector.
friend std::ostream & operator<<(std::ostream &os, Permutation3 const &p)
typename std::conditional< Complex, ComplexType, RealType >::type MelemType
unsigned int ParticleIndex
Index of a single particle degree of freedom.
const std::array< Permutation4, 24 > permutations4
An array of all 4! = 24 permutations of 4 elements.
bool operator!=(Permutation4 const &rhs) const
The main namespace of the library.
@ PP
Particle-particle channel.
Pomerol version information.
Permutation of 4 elements.