From ec032e308fb9b95d80c639c1a4314f46aaf9fd83 Mon Sep 17 00:00:00 2001 From: Dariusz Murakowski Date: Thu, 23 Apr 2015 01:37:30 -0400 Subject: [PATCH] Solve warning about comparison between signed and unsigned integer expressions. --- ham_ss.cpp | 9 +++++---- ham_ss.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ham_ss.cpp b/ham_ss.cpp index 323617d..9eba31a 100644 --- a/ham_ss.cpp +++ b/ham_ss.cpp @@ -164,13 +164,13 @@ PottsHamiltonian::PottsHamiltonian(std::string &FILENAME) { // Also, "gauge fixing" sets field and couplings between // the commonest states to zero. -double PottsHamiltonian::get_energy(const std::vector &config) const { +double PottsHamiltonian::get_energy(const std::vector &config) const { // Compute energy of the input configuration double E = 0; - for (int i=0;i &config) const { E -= J[i][config[i]]; - for (int j=i+1;j &config) const; + double get_energy(const std::vector &config) const; void set_temp(double x) { bh=x; bJ=x; } void set_temp(double x, double y) { bh=x; bJ=y; } -- 2.7.4