|
A library for working with phylogenetic and population genetic data.
v0.27.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_CORE_OPTIONS_H_
2 #define GENESIS_UTILS_CORE_OPTIONS_H_
89 void command_line(
int const argc,
char const*
const* argv );
100 return number_of_threads_;
160 return random_engine_;
174 return allow_file_overwriting_;
190 allow_file_overwriting_ = value;
214 print_obj_infos_ = value;
224 return print_obj_infos_;
245 print_obj_gists_ = value;
255 return print_obj_gists_;
371 std::string
info()
const;
389 std::vector<std::string> command_line_;
390 unsigned int number_of_threads_;
392 unsigned long random_seed_;
393 std::default_random_engine random_engine_;
395 bool allow_file_overwriting_ =
false;
397 bool print_obj_infos_ =
true;
398 long print_obj_gists_ = 0;
425 #endif // include guard
std::string info() const
Return a list with compile time and run time options with their values.
void allow_file_overwriting(bool value)
Set whether Genesis is allowed to overwrite files when outputting data.
static std::string compiler_version()
Return the compiler version that was used to compile genesis.
std::string info_run_time() const
Return a list of run time options.
unsigned long random_seed() const
Returns the random seed that was used to initialize the engine.
static std::string platform()
Return the platform under which genesis was compiled.
unsigned int guess_number_of_threads(bool use_openmp=true) const
Try to guess the number of hardware threads of the current system.
std::vector< std::string > command_line() const
Returns an array of strings containing the program's command line arguments.
static bool is_debug()
Return whether the binary was compiled with build type DEBUG.
std::string info_compile_time() const
Return a list of compile time options.
static bool stderr_is_terminal()
Return true iff the standard error stream is a terminal, and false if not, i.e., if it is a file or a...
static std::pair< int, int > terminal_size()
Return the width and height of the terminal that is used to run the program, in number of columns and...
static bool stdout_is_terminal()
Return true iff the standard output stream is a terminal, and false if not, i.e., if it is a file or ...
static std::string compile_date_time()
Return the date and time when genesis was compiled.
bool hyperthreads_enabled() const
Try to get whether hyperthreads are enabled in the current system.
static std::string compiler_family()
Return the compiler family (name) that was used to compile genesis.
static bool using_openmp()
Return whether the binary was compiled using OpenMP.
std::string command_line_string() const
Returns a string containing the program's command line arguments.
bool print_object_infos() const
Get whether an object info one-liner is printed when using the operator <<.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Simple Options class for application-wide configuration and settings.
static bool stdin_is_terminal()
Return true iff the standard input stream is a terminal, and false if not, i.e., if it is a file or a...
std::default_random_engine & random_engine()
Returns the default engine for random number generation.
unsigned int number_of_threads() const
Returns the number of threads.
long print_object_gists() const
Get whether an object gist is printed when using the operator <<.
void print_object_gists(long value)
Set whether an object gist is printed when using the operator << that is defined for many (container)...
static bool is_release()
Return whether the binary was compiled with build type RELEASE.
static bool is_little_endian()
Return whether the system uses little endian memory.
static bool using_pthreads()
Return whether the binary was compiled using Pthreads.
static Options & get()
Returns a single instance of this class.
static std::string build_type()
Return the build type that was used to compile the binary, i.e., "debug" or "release".
void print_object_infos(bool value)
Set whether an object info one-liner is printed when using the operator << that is defined for many c...
static bool is_big_endian()
Return whether the system uses big endian memory.
static std::string cpp_version()
Return the CPP version that was used to compile genesis.
bool allow_file_overwriting() const
Get whether Genesis is allowed to overwrite files when outputting data.
static bool using_zlib()
Return whether the binary was compiled using zlib.