summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p-spin.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/p-spin.hpp b/p-spin.hpp
index 91e0152..3ef10e7 100644
--- a/p-spin.hpp
+++ b/p-spin.hpp
@@ -36,9 +36,9 @@ std::tuple<double, Vector> WdW(const Tensor& J, const Vector& z) {
Matrix ddH;
std::tie(std::ignore, dH, ddH) = hamGradHess(J, z);
- double a = z.squaredNorm();
Vector dzdt = project(z, dH.conjugate());
+ double a = z.squaredNorm();
Scalar A = (Scalar)(z.transpose() * dzdt) / a;
Scalar B = dH.dot(z) / a;