diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-01-05 11:20:03 +0100 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-01-05 11:20:03 +0100 |
commit | c0cbb233d16306fec19c7c4325d61ae4b1248c1c (patch) | |
tree | bce665ba5c4e43336adf44b9f36361c212049557 /stereographic.hpp | |
parent | 40499ac858485c63b64b0ecaa892b10b62dbe8a7 (diff) | |
download | code-c0cbb233d16306fec19c7c4325d61ae4b1248c1c.tar.gz code-c0cbb233d16306fec19c7c4325d61ae4b1248c1c.tar.bz2 code-c0cbb233d16306fec19c7c4325d61ae4b1248c1c.zip |
Ran clang-format.
Diffstat (limited to 'stereographic.hpp')
-rw-r--r-- | stereographic.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stereographic.hpp b/stereographic.hpp index 7a6b411..7dd871c 100644 --- a/stereographic.hpp +++ b/stereographic.hpp @@ -17,7 +17,7 @@ Vector stereographicToEuclidean(const Vector& ζ) { Vector euclideanToStereographic(const Vector& z) { unsigned N = z.size(); Vector ζ(N - 1); - + for (unsigned i = 0; i < N - 1; i++) { ζ(i) = z(i) / (sqrt(N) - z(N - 1)); } @@ -33,7 +33,7 @@ Matrix stereographicJacobian(const Vector& ζ) { for (unsigned i = 0; i < N - 1; i++) { for (unsigned j = 0; j < N - 1; j++) { - J(i, j) = - 4.0 * ζ(i) * ζ(j); + J(i, j) = -4.0 * ζ(i) * ζ(j); if (i == j) { J(i, j) += 2.0 * (1.0 + b); } @@ -55,7 +55,8 @@ Matrix stereographicMetric(const Vector& ζ) { for (unsigned i = 0; i < N; i++) { for (unsigned j = 0; j < N; j++) { - g(i, j) = 16.0 * (std::conj(ζ(i)) * ζ(j) * (1.0 + a) - std::real(std::conj(ζ(i) * ζ(j)) * (1.0 + b))); + g(i, j) = 16.0 * (std::conj(ζ(i)) * ζ(j) * (1.0 + a) - + std::real(std::conj(ζ(i) * ζ(j)) * (1.0 + b))); if (i == j) { g(i, j) += 4.0 * std::abs(1.0 + b); } @@ -66,7 +67,8 @@ Matrix stereographicMetric(const Vector& ζ) { return g; } -std::tuple<std::complex<double>, Vector, Matrix> stereographicHamGradHess(const Tensor3& J, const Vector& ζ) { +std::tuple<std::complex<double>, Vector, Matrix> stereographicHamGradHess(const Tensor3& J, + const Vector& ζ) { Vector grad; Matrix hess; |