57 T ATA = -(M - M.t()) * (M - M.t());
62 if constexpr (std::is_same<T, arma::mat>::value)
63 arma::eig_sym(eigval, eigvec, ATA);
65 if constexpr (std::is_same<T, arma::sp_mat>::value)
67 int k = (size <
noe) ? size - 1 : noe;
68 arma::eigs_sym(eigval, eigvec, ATA, k, target.c_str(),
tol);
74 eigval.print(
"# === λ ===");
78 arma::mat vectors = eigvec.cols(0, nov < size ? nov - 1 : size - 1);
static bool showEigenvalues
show eigenvalues (flag)
Definition: Solver.hpp:37
Hamiltonian class for counting MZM in non-interacting systems.
Definition: Hamiltonian.hpp:13
static size_t nov
number of eigenvectors
Definition: Solver.hpp:28
int deg
number degree of freedom deg = 2 spinless systems deg = 4 spinfull systems (1/2 spin) ...
Definition: Hamiltonian.hpp:24
static size_t noe
number of eigenvalues
Definition: Solver.hpp:23
static bool showEigenvectors
show eigenvectors (flag)
Definition: Solver.hpp:42
static void LogAccomplished(std::string text="... done")
LogComment with green color.
Definition: Basics.hpp:91
static double tol
tolerance for arma::eigs_sym procedure
Definition: Solver.hpp:19
static solver
Definition: Solver.hpp:11
T elements
matrix element container
Definition: Hamiltonian.hpp:34
static void Diagonalize(Hamiltonian< T > &ham)
procedure for solving: -(M-M^T).(M-M^T)
Definition: Solver.hpp:52
static ViewerFunction View
Definition: VectorViewer.hpp:22
static void LogBegining(std::string text)
LogComment with red color.
Definition: Basics.hpp:81
static std::string target
target part of the spectrum
Definition: Solver.hpp:32