summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 00:32:38 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 00:32:38 -0400
commitd3b3e39a525d0c3aa9663f824ba96e0c429a8313 (patch)
tree942a902af332a532ab76fccbdb51c83e98338d5e /src
parent225905d1ad11a0f10d63ab0c6c71e6a5265e0894 (diff)
downloadc++-d3b3e39a525d0c3aa9663f824ba96e0c429a8313.tar.gz
c++-d3b3e39a525d0c3aa9663f824ba96e0c429a8313.tar.bz2
c++-d3b3e39a525d0c3aa9663f824ba96e0c429a8313.zip
partially class-ified, ising and On work but potts and height do not
Diffstat (limited to 'src')
-rw-r--r--src/wolff_On.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wolff_On.cpp b/src/wolff_On.cpp
index 3da6c7c..15a9553 100644
--- a/src/wolff_On.cpp
+++ b/src/wolff_On.cpp
@@ -20,8 +20,8 @@ typedef state_t <orthogonal_R_t, vector_R_t> On_t;
// angle from the x-axis of a two-vector
double theta(vector_R_t v) {
- double x = v.x[0];
- double y = v.x[1];
+ double x = v[0];
+ double y = v[1];
double val = atan(y / x);
@@ -191,7 +191,6 @@ int main(int argc, char *argv[]) {
for (v_t i = 0; i < pow(L, 2); i++) {
vector_R_t v_tmp = act_inverse(s->R, s->spins[i]);
double thetai = fmod(2 * M_PI + theta(v_tmp), 2 * M_PI);
- free_spin(v_tmp);
double saturation = 0.7;
double value = 0.9;
double chroma = saturation * value;