diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-01-07 11:23:20 +0100 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-01-07 11:23:20 +0100 |
commit | 2316044fd02bf22b5b6c0f414874dada2c7603e4 (patch) | |
tree | 4a44c9324a58bfa4d297e254aaf2cc9e63473663 /stereographic.hpp | |
parent | 71e7c3a86a8ea99045f564a52535ed08c4172451 (diff) | |
download | code-2316044fd02bf22b5b6c0f414874dada2c7603e4.tar.gz code-2316044fd02bf22b5b6c0f414874dada2c7603e4.tar.bz2 code-2316044fd02bf22b5b6c0f414874dada2c7603e4.zip |
Implemented some lazy optimizations and C++17isms.
Diffstat (limited to 'stereographic.hpp')
-rw-r--r-- | stereographic.hpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/stereographic.hpp b/stereographic.hpp index 8313f25..61d81c5 100644 --- a/stereographic.hpp +++ b/stereographic.hpp @@ -51,11 +51,7 @@ Matrix stereographicJacobian(const Vector& ζ) { } std::tuple<Scalar, Vector, Matrix> stereographicHamGradHess(const Tensor& J, const Vector& ζ, const Vector& z) { - Scalar hamiltonian; - Vector gradZ; - Matrix hessZ; - std::tie(hamiltonian, gradZ, hessZ) = hamGradHess(J, z); - + auto [hamiltonian, gradZ, hessZ] = hamGradHess(J, z); Matrix jacobian = stereographicJacobian(ζ); Matrix metric = jacobian * jacobian.adjoint(); |