MCPcopy Create free account
hub / github.com/SZAILAB/MaterialDFT-Demo / diagonal_real

Function diagonal_real

cpp_core/src/eigensolver.cpp:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32constexpr double kSPosDefFloor = 1e-12;
33
34std::vector<double> diagonal_real(const std::vector<Complex>& h_col_major, int n) {
35 std::vector<double> diag(static_cast<std::size_t>(n), 0.0);
36 for (int i = 0; i < n; ++i) {
37 diag[static_cast<std::size_t>(i)] = std::real(h_col_major[static_cast<std::size_t>(i + n * i)]);
38 }
39 return diag;
40}
41
42Complex dot_conj(
43 const std::vector<Complex>& a,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected