7#ifndef MULTICANONICAL_HEADER
8#define MULTICANONICAL_HEADER
24typedef bool (* iteration_pointer)(
const double OP);
25extern iteration_pointer iterate_weights;
69static void bin_OP_value(
double OP);
71static int find_OP_bin_index(
double OP);
73static bool all_visited(std::vector<int> &n);
74static bool first_last_visited(std::vector<int> &n);
76static void overcorrect(std::vector<double> &Weight, std::vector<int> &n_sum);
78static void recursive_weight_iteration(std::vector<double> &Weight,
80 std::vector<int> &g_sum,
81 std::vector<double> &g_log_h_sum);
83static void print_iteration_histogram();
85static std::vector<double> get_equidistant_bin_limits();
87static void setup_equidistant_bins();
89static void initialise_weight_vectors();
91static bool iterate_weight_function_direct(
double OP);
93static bool iterate_weight_function_direct_single(
double OP);
95static void setup_iteration();
void set_continuous_iteration(bool YN)
Enable/disable continuous weight iteration.
void write_weight_function(string W_function_filename)
Reads the precomputed weight function from run_parameters struct and saves it into a file.
void initialise(const string wfile_name)
Loads parameters and weights for the multicanonical computation.
bool accept_reject(const double OP_old, const double OP_new)
Accepts/rejects a multicanonical update.
void to_file(std::ofstream &output_file, string fmt, K input_value)
Writes a variable to the file, given the format string.
void read_weight_function(string W_function_filename)
Reads a precomputed weight function from file.
void set_weight_iter_flag(bool YN)
Sets the static g_WeightIterationFlag to given boolean.
double weight_function(double OP)
Returns a weight associated to the used order parameter.
double weight(double OP)
process 0 interface to "weight function" for the user accessing the weights.
void read_weight_parameters(string parameter_file_name)
Parses the weight parameter file and fills the g_WParam struct.
bool check_weight_iter_flag()
Returns the value of the static g_WeightIterationFlag to user.
string generate_outfile_name()
Generates a time stamped and otherwise appropriate file name for the saved weight function files.
void set_direct_iteration_FC(bool(*fc_pointer)(int_vector &n))
Sets a user provided function to the check in the "direct iteration" method.
Implement hila::swap for gauge fields.
std::ofstream output_file
this is just a hook to store output file, if it is in use