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

Function l2_norm

cpp_core/src/eigensolver.cpp:56–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56double l2_norm(const std::vector<Complex>& x) {
57 double sum = 0.0;
58 for (const Complex& xi : x) {
59 sum += std::norm(xi);
60 }
61 return std::sqrt(sum);
62}
63
64void orthogonalize_against(
65 std::vector<Complex>* v,

Callers 2

normalize_vectorFunction · 0.85

Calls 1

normFunction · 0.85

Tested by

no test coverage detected