summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-01-05 11:14:16 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-01-05 11:14:16 +0100
commit3541fa50708470789592ce9ac1f3baf1ee35943f (patch)
tree297f5e0cebb25906458e0560103654ffb99d1e15
parent1c79cff86e5cfae48e00184842101a9678b89903 (diff)
downloadcode-3541fa50708470789592ce9ac1f3baf1ee35943f.tar.gz
code-3541fa50708470789592ce9ac1f3baf1ee35943f.tar.bz2
code-3541fa50708470789592ce9ac1f3baf1ee35943f.zip
Cleaned up some notition.
-rw-r--r--langevin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/langevin.cpp b/langevin.cpp
index 7590d2b..6f26278 100644
--- a/langevin.cpp
+++ b/langevin.cpp
@@ -40,7 +40,7 @@ Vector initializeVector(unsigned N, Rng& r) {
return z;
}
-std::tuple<std::complex<double>, Vector, Matrix> hamGradHess(const Tensor& J, const Vector& z) {
+std::tuple<Scalar, Vector, Matrix> hamGradHess(const Tensor& J, const Vector& z) {
Matrix Jz = contractDown(J, z);
Vector Jzz = Jz * z;
@@ -139,13 +139,13 @@ int main(int argc, char* argv[]) {
}
}
- std::complex<double> κ(Rκ, Iκ);
+ Scalar κ(Rκ, Iκ);
double σ = sqrt(factorial(p) / (2.0 * pow(N, p - 1)));
Rng r;
complex_normal_distribution<> d(0, σ, κ);
- Tensor J = generateCouplings<std::complex<double>, p>(N, d, r.engine());
+ Tensor J = generateCouplings<Scalar, p>(N, d, r.engine());
Vector z = initializeVector(N, r);
std::function<bool(double, unsigned)> findSaddle = [δ](double W, unsigned) {
@@ -155,7 +155,7 @@ int main(int argc, char* argv[]) {
Vector zm = langevin(J, z, T, γ, findSaddle, r);
- std::complex<double> H;
+ Scalar H;
Vector dH;
std::tie(H, dH, std::ignore) = hamGradHess(J, zm);