|
ʻOhana
Population structure, admixture history, and selection using learning methods.
|
7 #ifndef JADE_SETTINGS_HPP__
8 #define JADE_SETTINGS_HPP__
10 #include "jade.forced_grouping.hpp"
11 #include "jade.genotype_matrix_factory.hpp"
12 #include "jade.options.hpp"
20 template <
typename TValue>
46 typedef std::unique_ptr<forced_grouping_type>
fg_ptr;
49 typedef std::unique_ptr<matrix_type>
fif_ptr;
52 typedef std::unique_ptr<genotype_matrix_type>
g_ptr;
97 const auto n = _g->get_height();
105 *_fif, k, _g->get_width());
111 ? _fg->randomize_q(_rnd)
214 #endif // JADE_SETTINGS_HPP__
const matrix_type & get_f() const
A template for a class that performs validation on various types of matrices.
void validate_empty() const
Throws an exception if there are more arguments to be processed.
basic_forced_grouping< value_type > forced_grouping_type
The forced grouping type.
const options_type & get_options() const
std::default_random_engine & get_engine()
basic_genotype_matrix_factory< value_type > g_matrix_factory_type
The genotype matrix factory type.
std::unique_ptr< genotype_matrix_type > g_ptr
The genotype matrix pointer type.
const matrix_type * get_fif() const
A template for an abstract class implementing operations for a genotype matrix.
matrix_type randomize_q(const size_t I, const size_t K)
bool is_fin_force_specified() const
TValue value_type
The value type.
std::unique_ptr< matrix_type > fif_ptr
The Fin-force pointer type.
const genotype_matrix_type & get_g() const
basic_verification< value_type > verification_type
The verification type.
basic_options< value_type > options_type
The options type.
static bool validate_f(const matrix_type &f)
Validates the F matrix and throws an exception if validation fails.
void read(const std::string &path)
Reads the matrix values from the specified file.
matrix_type randomize_f(const size_t K, const matrix_type &mu)
const std::string & get_fin_force() const
basic_randomizer< value_type > randomizer_type
The randomizer type.
size_t get_height() const
const std::string & get_fin() const
static bool validate_gqf_sizes(const genotype_matrix_type &g, const matrix_type &q, const matrix_type &f)
Validates the sizes of the G, Q, and F matrices and throws an exception if validation fails.
bool is_fin_specified() const
const matrix_type & get_q() const
A template for a class that helps process command-line arguments.
basic_settings(args &a)
Initializes a new instance of the class based on the specified arguments.
const forced_grouping_type * get_fg() const
A template for a class that creates genotype matrices based on files and their file extensions.
static bool validate_q(const matrix_type &q)
Validates the Q matrix and throws an exception if validation fails.
bool is_force_specified() const
static bool validate_g(const genotype_matrix_type &g)
Validates the G matrix and throws an exception if validation fails.
bool is_qin_specified() const
const std::string & get_force() const
const std::string & get_qin() const
static bool validate_fif_size(const matrix_type &fif, const size_t k, const size_t j)
Validates the size of the Fin-force matrix and throws an exception if validation fails.
basic_genotype_matrix< value_type > genotype_matrix_type
The genotype matrix.
A template for a class that implements the forced grouping feature.
value_type get_f_epsilon() const
const randomizer_type & get_randomizer() const
seed_type get_seed() const
basic_matrix< value_type > matrix_type
The matrix type.
std::unique_ptr< forced_grouping_type > fg_ptr
The forced grouping pointer type.