summaryrefslogtreecommitdiff
path: root/lib/state.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 13:06:54 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 13:06:54 -0400
commit870555f569bc63fecdc7c0b16e72e4e002f21c13 (patch)
tree704fc4669fa3c69af8882b10eff0e89321b3be83 /lib/state.h
parent215c40813a35c4fdc0bb5f1b8fdea125b9e9d2e4 (diff)
downloadc++-870555f569bc63fecdc7c0b16e72e4e002f21c13.tar.gz
c++-870555f569bc63fecdc7c0b16e72e4e002f21c13.tar.bz2
c++-870555f569bc63fecdc7c0b16e72e4e002f21c13.zip
all the R_t have been objectified
Diffstat (limited to 'lib/state.h')
-rw-r--r--lib/state.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/state.h b/lib/state.h
index b57a9e2..eefa0cb 100644
--- a/lib/state.h
+++ b/lib/state.h
@@ -30,12 +30,11 @@ class state_t {
std::function <double(X_t, X_t)> J;
std::function <double(X_t)> H;
- state_t(D_t D, L_t L, double T, std::function <double(X_t, X_t)> J, std::function <double(X_t)> H) : D(D), L(L), g(D, L), T(T), J(J), H(H) {
+ state_t(D_t D, L_t L, double T, std::function <double(X_t, X_t)> J, std::function <double(X_t)> H) : D(D), L(L), g(D, L), T(T), R(), J(J), H(H) {
nv = g.nv;
ne = g.ne;
g.add_ext();
spins.resize(nv);
- init (&R);
E = - (double)ne * J(spins[0], spins[0]) - (double)nv * H(spins[0]);
M = spins[0] * nv;
last_cluster_size = 0;
@@ -52,10 +51,6 @@ class state_t {
precomputed_sin[i] = sin(2 * M_PI * (double)i / (double)L);
}
}
-
- ~state_t() {
- free_spin(R);
- }
};