Use unique_ptr instead of raw pointer
This commit is contained in:
39
src/sims.h
39
src/sims.h
@@ -7,38 +7,19 @@
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief Run simulation for spectra
|
||||
*
|
||||
* @param parameter Dictionary of parameter for simulation
|
||||
* @param optional Dictionary of parameter set via command line
|
||||
* @param motion Motion model
|
||||
* @param dist Distribution of correlation times
|
||||
*/
|
||||
void run_spectrum(std::unordered_map<std::string, double>& parameter, std::unordered_map<std::string, double> optional, motions::BaseMotion& motion, times::BaseDistribution& dist);
|
||||
struct Trajectory {
|
||||
std::vector<double> time;
|
||||
std::vector<double> phase;
|
||||
std::vector<double> omega;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Run simulation for stimulated echoes
|
||||
*
|
||||
* @param parameter Dictionary of parameter for simulation
|
||||
* @param optional Dictionary of parameter set via command line
|
||||
* @param motion Motion model
|
||||
* @param dist Distribution of correlation times
|
||||
*/
|
||||
void run_ste(std::unordered_map<std::string, double>& parameter, std::unordered_map<std::string, double> optional, motions::BaseMotion& motion, times::BaseDistribution& dist);
|
||||
void run_spectrum(std::unordered_map<std::string, double>& parameter, std::unordered_map<std::string, double> optional, motions::BaseMotion& motion, times::BaseDistribution& dist, std::mt19937_64& rng);
|
||||
|
||||
/**
|
||||
* @brief Create trajectory of a single walker
|
||||
*
|
||||
* @param motion Motion model
|
||||
* @param dist Distribution of correlation times
|
||||
* @param t_max Double that defines maximum time of trajectory
|
||||
* @param out_time Vector of waiting times
|
||||
* @param out_phase Vector of phase between waiting times
|
||||
* @param out_omega Vector of omega at jump time
|
||||
*/
|
||||
void make_trajectory(motions::BaseMotion& motion, times::BaseDistribution& dist, double t_max, std::vector<double>& out_time, std::vector<double>& out_phase, std::vector<double>& out_omega);
|
||||
void run_ste(std::unordered_map<std::string, double>& parameter, std::unordered_map<std::string, double> optional, motions::BaseMotion& motion, times::BaseDistribution& dist, std::mt19937_64& rng);
|
||||
|
||||
Trajectory make_trajectory(motions::BaseMotion& motion, times::BaseDistribution& dist, double t_max, std::mt19937_64& rng);
|
||||
|
||||
std::chrono::system_clock::time_point printStart(std::unordered_map<std::string, double> &optional);
|
||||
void printEnd(std::chrono::system_clock::time_point start);
|
||||
|
||||
Reference in New Issue
Block a user