Make some changes
- Add new programs - Add command line args - Add Usage to guide user on how to use programs
This commit is contained in:
@@ -31,8 +31,8 @@ namespace montecarlo {
|
||||
* @param cycles The amount of Monte Carlo cycles to do
|
||||
* @param filename The file to write to
|
||||
* */
|
||||
void progression(double T, int L, int cycles,
|
||||
const std::string filename);
|
||||
void progression(double T, int L, int cycles, const std::string filename,
|
||||
int burn_in_time = BURN_IN_TIME);
|
||||
|
||||
/** @brief Write the expected values for each Monte Carlo cycles to file.
|
||||
*
|
||||
@@ -43,7 +43,7 @@ void progression(double T, int L, int cycles,
|
||||
* @param filename The file to write to
|
||||
* */
|
||||
void progression(double T, int L, int cycles, int value,
|
||||
const std::string filename);
|
||||
const std::string filename, int burn_in_time = BURN_IN_TIME);
|
||||
|
||||
/** @brief Estimate the probability distribution for the energy.
|
||||
*
|
||||
@@ -52,8 +52,8 @@ void progression(double T, int L, int cycles, int value,
|
||||
* @param cycles The amount of Monte Carlo cycles to do
|
||||
* @param filename The file to write to
|
||||
* */
|
||||
void pd_estimate(double T, int L, int cycles,
|
||||
const std::string filename);
|
||||
void pd_estimate(double T, int L, int cycles, const std::string filename,
|
||||
int burn_in_time = BURN_IN_TIME);
|
||||
|
||||
/** @brief Execute the Metropolis algorithm for a certain amount of Monte
|
||||
* Carlo cycles.
|
||||
@@ -64,7 +64,8 @@ void pd_estimate(double T, int L, int cycles,
|
||||
*
|
||||
* @return data_t
|
||||
* */
|
||||
data_t mcmc_serial(int L, double T, int cycles, int burn_in_time = BURN_IN_TIME);
|
||||
data_t mcmc_serial(int L, double T, int cycles,
|
||||
int burn_in_time = BURN_IN_TIME);
|
||||
|
||||
/** @brief Execute the Metropolis algorithm for a certain amount of Monte
|
||||
* Carlo cycles in parallel.
|
||||
@@ -75,7 +76,8 @@ data_t mcmc_serial(int L, double T, int cycles, int burn_in_time = BURN_IN_TIME)
|
||||
*
|
||||
* @return data_t
|
||||
* */
|
||||
data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time = BURN_IN_TIME);
|
||||
data_t mcmc_parallel(int L, double T, int cycles,
|
||||
int burn_in_time = BURN_IN_TIME);
|
||||
|
||||
/** @brief Perform the MCMC algorithm using a range of temperatures.
|
||||
*
|
||||
@@ -86,10 +88,10 @@ data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time = BURN_IN_TIM
|
||||
* @param monte_carlo Which Monte Carlo implementation to use
|
||||
* @param outfile The file to write the data to
|
||||
* */
|
||||
void
|
||||
phase_transition(int L, double start_T, double end_T, int points_T, int cycles,
|
||||
std::function<data_t(int, double, int, int)> monte_carlo,
|
||||
std::string outfile, int burn_in_time = BURN_IN_TIME);
|
||||
void phase_transition(int L, double start_T, double end_T, int points_T,
|
||||
int cycles,
|
||||
std::function<data_t(int, double, int, int)> monte_carlo,
|
||||
std::string outfile, int burn_in_time = BURN_IN_TIME);
|
||||
}; // namespace montecarlo
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace details {
|
||||
*
|
||||
* @details This function should only be used for the __METHOD_NAME__ macro,
|
||||
* since it takes the output from __PRETTY_FUNCTION__ and strips the return
|
||||
* type.
|
||||
* type.
|
||||
*
|
||||
* @param pretty_function The string from __PRETTY_FUNCTION__
|
||||
*
|
||||
@@ -114,6 +114,21 @@ bool mkpath(std::string path, int mode = 0777);
|
||||
* */
|
||||
std::string dirname(const std::string &path);
|
||||
|
||||
/** @brief Take 2 strings and concatenate them and make sure there is a
|
||||
* directory separator (/) between them.
|
||||
*
|
||||
* @details This function doesn't care whether or not the values given as
|
||||
* parameters are valid path strings. It is the responsibility of the user to make
|
||||
* sure that the values given are valid path strings.
|
||||
* The function only guarantees that the output string is a valid path string.
|
||||
*
|
||||
* @param left The left hand side of the result string
|
||||
* @param right The right hand side of the result string
|
||||
*
|
||||
* @return string
|
||||
* */
|
||||
std::string concatpath(const std::string &left, const std::string &right);
|
||||
|
||||
} // namespace utils
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user