From 5698efde2e8bb86571dcf72d97ca4d702106b394 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 29 Dec 2020 13:47:11 +0100 Subject: Nicer variable names in gradHess function. --- langevin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/langevin.cpp b/langevin.cpp index 3e03f76..f29cd25 100644 --- a/langevin.cpp +++ b/langevin.cpp @@ -105,12 +105,12 @@ Matrix identity(unsigned N) { std::tuple gradHess(const Tensor& J, const Vector& z, std::complex ε) { Matrix J1 = z.contract(J, ip); - Matrix H = ((p - 1) * (double)p / factorial(p)) * J1 - ((double)p * ε) * identity(z.size()); + Matrix hess = ((p - 1) * (double)p / factorial(p)) * J1 - ((double)p * ε) * identity(z.size()); Vector J2 = z.contract(J1, ip); - Vector g = ((double)p / factorial(p)) * J2 - ((double)p * ε) * z; + Vector grad = ((double)p / factorial(p)) * J2 - ((double)p * ε) * z; - return {g, H}; + return {grad, hess}; } std::tuple, Vector> WdW(const Tensor& J, const Vector& z, std::complex ε) { -- cgit v1.2.3-54-g00ecf