Make changes
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "utils.hpp"
|
||||
|
||||
#include <armadillo>
|
||||
#include <cstdint>
|
||||
#include <random>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -53,7 +54,8 @@ private:
|
||||
|
||||
/** @brief A hash map containing all possible energy changes.
|
||||
* */
|
||||
std::unordered_map<int, double> energy_diff;
|
||||
//std::unordered_map<int, double> energy_diff;
|
||||
double energy_diff[17];
|
||||
|
||||
/** @brief The temperature of the model.
|
||||
* */
|
||||
@@ -65,12 +67,15 @@ private:
|
||||
|
||||
/** @brief The current energy state. unit: \f$ J \f$.
|
||||
* */
|
||||
int E;
|
||||
int64_t E;
|
||||
|
||||
/** @brief The current magnetic strength. unit: Unitless.
|
||||
* */
|
||||
int M;
|
||||
int64_t M;
|
||||
|
||||
std::mt19937 engine;
|
||||
|
||||
void initialize_engine();
|
||||
/** @brief Initialize the lattice with a random distribution of 1s and
|
||||
* -1s.
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user