|
ʻOhana
Population structure, admixture history, and selection using learning methods.
|
7 #ifndef JADE_AGI_CONTROLLER_HPP__
8 #define JADE_AGI_CONTROLLER_HPP__
10 #include "jade.controller.hpp"
18 template <
typename TValue>
60 , _agi (settings.get_agi())
61 , _args (_agi.get_args())
83 std::cout <<
"\n[Admixture Graph Output]\n";
86 std::cout << name <<
"\t" << _args[name] <<
"\n";
88 std::cout << name <<
"\t" << _args[name] <<
"\n";
125 for (
const auto item : src)
137 for (
size_t i = 0; i < n; i++)
151 _args[name] = src[i++];
153 _args[name] = src[i++];
169 const auto rk = _agi.
get_k() - 1;
171 for (
size_t row = 0; row < rk; row++)
172 for (
size_t col = 0; col <= row; col++)
173 dst(row, col) = entries[i++].evaluate(_args);
188 #endif // JADE_AGI_CONTROLLER_HPP__
A template for a class that performs the Nelder-Mead optimization. This class implements shared featu...
simplex_type::container_type container_type
The container type for the simplex.
basic_settings< value_type > settings_type
The settings type.
std::map< std::string, float_type > args_type
A map of strings to floating-point values. The string represent the variable names parsed from the ex...
simplex_type::exit_condition_type exit_condition_type
The exit condition type for the simplex.
basic_agi_controller(const settings_type &settings)
Initializes a new instance of the class based on the specified program settings.
TValue value_type
The value type.
basic_matrix< value_type > matrix_type
The matrix type.
basic_agi_reader< value_type > agi_reader_type
The admixture graph input reader type.
static void set_high_precision(std::ostream &out)
Sets the specified stream to scientific notation with a high precision.
A template for a class that reads an AGI (Admixture Graph Input) file. The file provides the followin...
std::size_t get_k() const
Returns the number of components.
shunting_yard_type::args_type args_type
The arguments passed to the shunting-yard algorithm.
A template for a class that implements the Nelder-Mead Simplex Method, which attempts to minimize an ...
std::vector< value_type > container_type
The container type.
basic_shunting_yard< value_type > shunting_yard_type
The shunting-yard algorithm type.
const std::vector< std::string > & get_branch_names() const
Returns the vector of branch names.
void emit_results(const options_type &opts, const simplex_type &simplex, const exit_condition_type &condition) override
Writes results to standard output and files.
virtual void emit_results(const options_type &opts, const simplex_type &simplex, const exit_condition_type &)
Writes results to standard output and files.
const std::vector< shunting_yard_type > & get_entries() const
Returns the vector of expressions for the C matrix entries.
A template for a class encapsulating the settings provided to the optimizer.
A template for a class that encodes and decodes parameters for the Nelder-Mead algorithm....
A template for a class that implements the shunting-yard algorithm. The implementation supports '+',...
basic_simplex< value_type > simplex_type
The simplex type.
const std::vector< std::string > & get_proportion_names() const
Returns the vector of proportion names.
basic_options< value_type > options_type
The options type.
bool _decode_lower(matrix_type &dst, const container_type &src) override
Decodes the specified Nelder-Mead container and stores the result into the lower triangle,...
container_type init_parameters() override
Creates and returns the initial set of parameters for the Nelder- Mead algorithm.