ʻOhana
Population structure, admixture history, and selection using learning methods.
Public Types | Public Member Functions | Static Public Member Functions
jade::basic_settings< TValue > Class Template Reference

A template for a class encapsulating the settings provided to the optimizer. More...

#include <jade.settings.hpp>

+ Collaboration diagram for jade::basic_settings< TValue >:

Public Types

typedef TValue value_type
 The value type. More...
 
typedef basic_matrix< value_typematrix_type
 The matrix type. More...
 
typedef basic_forced_grouping< value_typeforced_grouping_type
 The forced grouping type. More...
 
typedef basic_genotype_matrix< value_typegenotype_matrix_type
 The genotype matrix. More...
 
typedef basic_options< value_typeoptions_type
 The options type. More...
 
typedef basic_randomizer< value_typerandomizer_type
 The randomizer type. More...
 
typedef basic_verification< value_typeverification_type
 The verification type. More...
 
typedef std::unique_ptr< forced_grouping_typefg_ptr
 The forced grouping pointer type. More...
 
typedef std::unique_ptr< matrix_typefif_ptr
 The Fin-force pointer type. More...
 
typedef std::unique_ptr< genotype_matrix_typeg_ptr
 The genotype matrix pointer type. More...
 
typedef basic_genotype_matrix_factory< value_typeg_matrix_factory_type
 The genotype matrix factory type. More...
 
typedef TValue value_type
 The value type. More...
 
typedef basic_agi_reader< value_typeagi_reader_type
 The admixture graph input reader. More...
 
typedef std::unique_ptr< agi_reader_typeagi_ptr_type
 A pointer to an admixture graph input reader. More...
 
typedef basic_genotype_matrix_factory< value_typegenotype_matrix_factory_type
 The genotype matrix factory type. More...
 
typedef basic_genotype_matrix< value_typegenotype_matrix_type
 The genotype matrix type. More...
 
typedef basic_matrix< value_typematrix_type
 The matrix type. More...
 
typedef basic_options< value_typeoptions_type
 The options type. More...
 
typedef basic_verification< value_typeverification_type
 The verification type. More...
 
typedef TValue value_type
 The value type. More...
 
typedef basic_matrix< value_typematrix_type
 The matrix type. More...
 
typedef basic_forced_grouping< value_typeforced_grouping_type
 The forced grouping type. More...
 
typedef basic_genotype_matrix< value_typegenotype_matrix_type
 The genotype matrix. More...
 
typedef basic_options< value_typeoptions_type
 The options type. More...
 
typedef basic_randomizer< value_typerandomizer_type
 The randomizer type. More...
 
typedef basic_verification< value_typeverification_type
 The verification type. More...
 
typedef std::unique_ptr< forced_grouping_typefg_ptr
 The forced grouping pointer type. More...
 
typedef std::unique_ptr< matrix_typefif_ptr
 The Fin-force pointer type. More...
 
typedef std::unique_ptr< genotype_matrix_typeg_ptr
 The genotype matrix pointer type. More...
 
typedef basic_genotype_matrix_factory< value_typeg_matrix_factory_type
 The genotype matrix factory type. More...
 

Public Member Functions

 basic_settings (args &a)
 Initializes a new instance of the class based on the specified arguments. More...
 
const matrix_typeget_f () const
 
matrix_typeget_f ()
 
const matrix_typeget_fif () const
 
const forced_grouping_typeget_fg () const
 
const genotype_matrix_typeget_g () const
 
const options_typeget_options () const
 
const matrix_typeget_q () const
 
matrix_typeget_q ()
 
const randomizer_typeget_randomizer () const
 
 basic_settings (args &a)
 Initializes a new instance of the class based on the specified command-line arguments. More...
 
const agi_reader_typeget_agi () const
 
const matrix_typeget_c () const
 
const matrix_typeget_mu () const
 
const options_typeget_options () const
 
const matrix_typeget_rf () const
 
 basic_settings (args &a)
 Initializes a new instance of the class based on the specified arguments. More...
 
const matrix_typeget_f () const
 
matrix_typeget_f ()
 
const matrix_typeget_fif () const
 
const forced_grouping_typeget_fg () const
 
const genotype_matrix_typeget_g () const
 
const options_typeget_options () const
 
const matrix_typeget_q () const
 
matrix_typeget_q ()
 
const randomizer_typeget_randomizer () const
 

Static Public Member Functions

static matrix_type create_c (const matrix_type &rf)
 Creates the covariance matrix. More...
 
static matrix_type create_rf (const matrix_type &f)
 Creates the rooted F matrix. More...
 

Detailed Description

template<typename TValue>
class jade::basic_settings< TValue >

A template for a class encapsulating the settings provided to the optimizer.

A template for a class that prepares settings for the algorithm.

Definition at line 21 of file cpax/jade.settings.hpp.

Member Typedef Documentation

◆ agi_ptr_type

template<typename TValue >
typedef std::unique_ptr<agi_reader_type> jade::basic_settings< TValue >::agi_ptr_type

A pointer to an admixture graph input reader.

Definition at line 30 of file nemeco/jade.settings.hpp.

◆ agi_reader_type

template<typename TValue >
typedef basic_agi_reader<value_type> jade::basic_settings< TValue >::agi_reader_type

The admixture graph input reader.

Definition at line 27 of file nemeco/jade.settings.hpp.

◆ fg_ptr [1/2]

template<typename TValue >
typedef std::unique_ptr<forced_grouping_type> jade::basic_settings< TValue >::fg_ptr

The forced grouping pointer type.

Definition at line 46 of file cpax/jade.settings.hpp.

◆ fg_ptr [2/2]

template<typename TValue >
typedef std::unique_ptr<forced_grouping_type> jade::basic_settings< TValue >::fg_ptr

The forced grouping pointer type.

Definition at line 46 of file qpas/jade.settings.hpp.

◆ fif_ptr [1/2]

template<typename TValue >
typedef std::unique_ptr<matrix_type> jade::basic_settings< TValue >::fif_ptr

The Fin-force pointer type.

Definition at line 49 of file cpax/jade.settings.hpp.

◆ fif_ptr [2/2]

template<typename TValue >
typedef std::unique_ptr<matrix_type> jade::basic_settings< TValue >::fif_ptr

The Fin-force pointer type.

Definition at line 49 of file qpas/jade.settings.hpp.

◆ forced_grouping_type [1/2]

template<typename TValue >
typedef basic_forced_grouping<value_type> jade::basic_settings< TValue >::forced_grouping_type

The forced grouping type.

Definition at line 31 of file cpax/jade.settings.hpp.

◆ forced_grouping_type [2/2]

template<typename TValue >
typedef basic_forced_grouping<value_type> jade::basic_settings< TValue >::forced_grouping_type

The forced grouping type.

Definition at line 31 of file qpas/jade.settings.hpp.

◆ g_matrix_factory_type [1/2]

The genotype matrix factory type.

Definition at line 56 of file cpax/jade.settings.hpp.

◆ g_matrix_factory_type [2/2]

The genotype matrix factory type.

Definition at line 56 of file qpas/jade.settings.hpp.

◆ g_ptr [1/2]

template<typename TValue >
typedef std::unique_ptr<genotype_matrix_type> jade::basic_settings< TValue >::g_ptr

The genotype matrix pointer type.

Definition at line 52 of file cpax/jade.settings.hpp.

◆ g_ptr [2/2]

template<typename TValue >
typedef std::unique_ptr<genotype_matrix_type> jade::basic_settings< TValue >::g_ptr

The genotype matrix pointer type.

Definition at line 52 of file qpas/jade.settings.hpp.

◆ genotype_matrix_factory_type

The genotype matrix factory type.

Definition at line 34 of file nemeco/jade.settings.hpp.

◆ genotype_matrix_type [1/3]

template<typename TValue >
typedef basic_genotype_matrix<value_type> jade::basic_settings< TValue >::genotype_matrix_type

The genotype matrix.

Definition at line 34 of file cpax/jade.settings.hpp.

◆ genotype_matrix_type [2/3]

template<typename TValue >
typedef basic_genotype_matrix<value_type> jade::basic_settings< TValue >::genotype_matrix_type

The genotype matrix type.

Definition at line 37 of file nemeco/jade.settings.hpp.

◆ genotype_matrix_type [3/3]

template<typename TValue >
typedef basic_genotype_matrix<value_type> jade::basic_settings< TValue >::genotype_matrix_type

The genotype matrix.

Definition at line 34 of file qpas/jade.settings.hpp.

◆ matrix_type [1/3]

template<typename TValue >
typedef basic_matrix<value_type> jade::basic_settings< TValue >::matrix_type

The matrix type.

Definition at line 28 of file cpax/jade.settings.hpp.

◆ matrix_type [2/3]

template<typename TValue >
typedef basic_matrix<value_type> jade::basic_settings< TValue >::matrix_type

The matrix type.

Definition at line 40 of file nemeco/jade.settings.hpp.

◆ matrix_type [3/3]

template<typename TValue >
typedef basic_matrix<value_type> jade::basic_settings< TValue >::matrix_type

The matrix type.

Definition at line 28 of file qpas/jade.settings.hpp.

◆ options_type [1/3]

template<typename TValue >
typedef basic_options<value_type> jade::basic_settings< TValue >::options_type

The options type.

Definition at line 37 of file cpax/jade.settings.hpp.

◆ options_type [2/3]

template<typename TValue >
typedef basic_options<value_type> jade::basic_settings< TValue >::options_type

The options type.

Definition at line 43 of file nemeco/jade.settings.hpp.

◆ options_type [3/3]

template<typename TValue >
typedef basic_options<value_type> jade::basic_settings< TValue >::options_type

The options type.

Definition at line 37 of file qpas/jade.settings.hpp.

◆ randomizer_type [1/2]

template<typename TValue >
typedef basic_randomizer<value_type> jade::basic_settings< TValue >::randomizer_type

The randomizer type.

Definition at line 40 of file cpax/jade.settings.hpp.

◆ randomizer_type [2/2]

template<typename TValue >
typedef basic_randomizer<value_type> jade::basic_settings< TValue >::randomizer_type

The randomizer type.

Definition at line 40 of file qpas/jade.settings.hpp.

◆ value_type [1/3]

template<typename TValue >
typedef TValue jade::basic_settings< TValue >::value_type

The value type.

Definition at line 25 of file cpax/jade.settings.hpp.

◆ value_type [2/3]

template<typename TValue >
typedef TValue jade::basic_settings< TValue >::value_type

The value type.

Definition at line 24 of file nemeco/jade.settings.hpp.

◆ value_type [3/3]

template<typename TValue >
typedef TValue jade::basic_settings< TValue >::value_type

The value type.

Definition at line 25 of file qpas/jade.settings.hpp.

◆ verification_type [1/3]

template<typename TValue >
typedef basic_verification<value_type> jade::basic_settings< TValue >::verification_type

The verification type.

Definition at line 43 of file cpax/jade.settings.hpp.

◆ verification_type [2/3]

template<typename TValue >
typedef basic_verification<value_type> jade::basic_settings< TValue >::verification_type

The verification type.

Definition at line 46 of file nemeco/jade.settings.hpp.

◆ verification_type [3/3]

template<typename TValue >
typedef basic_verification<value_type> jade::basic_settings< TValue >::verification_type

The verification type.

Definition at line 43 of file qpas/jade.settings.hpp.

Constructor & Destructor Documentation

◆ basic_settings() [1/3]

template<typename TValue >
jade::basic_settings< TValue >::basic_settings ( args a)
inlineexplicit

Initializes a new instance of the class based on the specified arguments.

Parameters
aThe command-line arguments.

Definition at line 62 of file cpax/jade.settings.hpp.

64  : _opts (a)
65  , _g (g_matrix_factory_type::create(a.pop<std::string>()))
66  , _q ()
67  , _f ()
68  , _fif ()
69  , _fg ()
70  , _rnd ()
71  {
73 
74  a.validate_empty();
75 
76  if (_opts.is_qin_specified())
77  {
78  _q.read(_opts.get_qin());
80  }
81 
82  if (_opts.is_fin_specified())
83  {
84  _f.read(_opts.get_fin());
86  }
87 
88  if (_opts.is_fin_force_specified())
89  {
90  _fif.reset(new matrix_type(_opts.get_fin_force()));
92  }
93 
94  if (_opts.is_force_specified())
95  _fg.reset(new forced_grouping_type(_opts.get_force()));
96 
97  const auto n = _g->get_height();
98  const auto k = _opts.is_qin_specified() ? _q.get_width() :
99  _opts.is_fin_specified() ? _f.get_height() :
100  _opts.is_force_specified() ? _fg->get_k() :
101  _opts.get_ksize();
102 
103  if (_fif)
105  *_fif, k, _g->get_width());
106 
107  _rnd.get_engine().seed(_opts.get_seed());
108 
109  if (!_opts.is_qin_specified())
110  _q = _opts.is_force_specified()
111  ? _fg->randomize_q(_rnd)
112  : _rnd.randomize_q(n ,k);
113 
114  if (_opts.is_fin_force_specified())
115  _f = _rnd.randomize_f(
116  k,
117  _g->create_mu(_opts.get_f_epsilon()),
118  *_fif);
119  else if (!_opts.is_fin_specified())
120  _f = _rnd.randomize_f(
121  k,
122  _g->create_mu(_opts.get_f_epsilon()));
123 
125 
126  if (_opts.is_force_specified())
127  _fg->validate_q(_q);
128  }
+ Here is the call graph for this function:

◆ basic_settings() [2/3]

template<typename TValue >
jade::basic_settings< TValue >::basic_settings ( args a)
inlineexplicit

Initializes a new instance of the class based on the specified command-line arguments.

Parameters
aThe command-line arguments.

Definition at line 52 of file nemeco/jade.settings.hpp.

54  : _opts (a)
55  , _agi ()
56  , _f ()
57  , _rf ()
58  , _c ()
59  , _mu ()
60  {
61  if (_opts.is_ain_specified())
62  _agi.reset(new agi_reader_type(_opts.get_ain()));
63 
64  const std::unique_ptr<genotype_matrix_type> g_ptr (
65  genotype_matrix_factory_type::create(a.pop<std::string>()));
66  const auto & g = *g_ptr;
68 
69  _f.read(a.pop<std::string>());
71 
72  a.validate_empty();
73 
74  _rf = create_rf(_f);
75  _mu = g.create_mu(_opts.get_f_epsilon());
76 
77  //
78  // If the user specifies the C matrix, read it from the file; if
79  // the user specifies a tree or the AGI file, do not initialize its
80  // values because they will be initialized by the optimizer based
81  // on the tree or AGI definitions. If the C matrix, the tree, and
82  // the AGI file are unspecified, then create it as the sample
83  // covariance matrix of the rooted F matrix.
84  //
85  if (_opts.is_cin_specified())
86  {
87  _c.read(_opts.get_cin());
90  }
91  else if (_opts.is_tin_specified())
92  {
93  const auto rk = _rf.get_height();
94  _c.resize(rk, rk);
95  }
96  else if (_opts.is_ain_specified())
97  {
98  const auto agi_k = _agi->get_k();
99  const auto f_k = _f.get_height();
100 
101  if (agi_k != f_k)
102  throw jade::error()
103  << "inconsistent component sizes " << agi_k << " and "
104  << f_k << " in AGI file and F matrix.";
105 
106  const auto rk = _rf.get_height();
107  _c.resize(rk, rk);
108  }
109  else
110  {
111  _c = create_c(_rf);
112  }
113 
115  }
+ Here is the call graph for this function:

◆ basic_settings() [3/3]

template<typename TValue >
jade::basic_settings< TValue >::basic_settings ( args a)
inlineexplicit

Initializes a new instance of the class based on the specified arguments.

Parameters
aThe command-line arguments.

Definition at line 62 of file qpas/jade.settings.hpp.

64  : _opts (a)
65  , _g (g_matrix_factory_type::create(a.pop<std::string>()))
66  , _q ()
67  , _f ()
68  , _fif ()
69  , _fg ()
70  , _rnd ()
71  {
73 
74  a.validate_empty();
75 
76  if (_opts.is_qin_specified())
77  {
78  _q.read(_opts.get_qin());
80  }
81 
82  if (_opts.is_fin_specified())
83  {
84  _f.read(_opts.get_fin());
86  }
87 
88  if (_opts.is_fin_force_specified())
89  {
90  _fif.reset(new matrix_type(_opts.get_fin_force()));
92  }
93 
94  if (_opts.is_force_specified())
95  _fg.reset(new forced_grouping_type(_opts.get_force()));
96 
97  const auto n = _g->get_height();
98  const auto k = _opts.is_qin_specified() ? _q.get_width() :
99  _opts.is_fin_specified() ? _f.get_height() :
100  _opts.is_force_specified() ? _fg->get_k() :
101  _opts.get_ksize();
102 
103  if (_fif)
105  *_fif, k, _g->get_width());
106 
107  _rnd.get_engine().seed(_opts.get_seed());
108 
109  if (!_opts.is_qin_specified())
110  _q = _opts.is_force_specified()
111  ? _fg->randomize_q(_rnd)
112  : _rnd.randomize_q(n ,k);
113 
114  if (_opts.is_fin_force_specified())
115  _f = _rnd.randomize_f(
116  k,
117  _g->create_mu(_opts.get_f_epsilon()),
118  *_fif);
119  else if (!_opts.is_fin_specified())
120  _f = _rnd.randomize_f(
121  k,
122  _g->create_mu(_opts.get_f_epsilon()));
123 
125 
126  if (_opts.is_force_specified())
127  _fg->validate_q(_q);
128  }
+ Here is the call graph for this function:

Member Function Documentation

◆ create_c()

template<typename TValue >
static matrix_type jade::basic_settings< TValue >::create_c ( const matrix_type rf)
inlinestatic

Creates the covariance matrix.

Returns
The covariance matrix.
Parameters
rfThe [RK x 1] rooted F matrix.

Definition at line 162 of file nemeco/jade.settings.hpp.

164  {
165  const auto RK = rf.get_height();
166  const auto J = rf.get_width();
167 
168  assert(J > 1);
169 
170  static const auto n1 = value_type(1.0);
171  static const auto n0_25 = value_type(0.25);
172  const auto nj = static_cast<value_type>(J);
173  const auto nj1 = static_cast<value_type>(J - 1);
174  const auto s = n1 / nj1 / n0_25;
175 
176  //
177  // Create a vector of average row values for the RF matrix.
178  //
179  matrix_type rf_avg (RK, 1);
180  for (size_t rk = 0; rk < RK; rk++)
181  rf_avg[rk] = rf.get_row_sum(rk) / nj;
182 
183  //
184  // The covariance matrix is [K-1 x K-1].
185  //
186  matrix_type c (RK, RK);
187 
188  //
189  // Calculate the lower triangle of sample covariance of the RF
190  // matrix and divide it by the mux.
191  //
192  for (size_t j = 0; j < J; j++)
193  {
194  for (size_t row = 0; row < RK; row++)
195  {
196  const auto s_row = s * (rf(row, j) - rf_avg[row]);
197  for (size_t col = 0; col <= row; col++)
198  c(row, col) += s_row * (rf(col, j) - rf_avg[col]);
199  }
200  }
201 
202  //
203  // Copy the lower triangle to the upper triangle and return the
204  // covariance matrix.
205  //
206  c.copy_lower_to_upper();
207  return c;
208  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_rf()

template<typename TValue >
static matrix_type jade::basic_settings< TValue >::create_rf ( const matrix_type f)
inlinestatic

Creates the rooted F matrix.

Returns
The rooted F matrix.
Parameters
fThe F matrix for major alleles.

Definition at line 214 of file nemeco/jade.settings.hpp.

216  {
217  const auto K = f.get_height();
218  const auto J = f.get_width();
219 
220  assert(K > 1);
221 
222  const auto RK = K - 1;
223 
224  matrix_type rf (RK, J);
225 
226  for (size_t rk = 0; rk < RK; rk++)
227  for (size_t j = 0; j < J; j++)
228  rf(rk, j) = f(rk + 1, j) - f(0, j);
229 
230  return rf;
231  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_agi()

template<typename TValue >
const agi_reader_type& jade::basic_settings< TValue >::get_agi ( ) const
inline
Returns
The admixture graph input reader.

Definition at line 120 of file nemeco/jade.settings.hpp.

121  {
122  assert(nullptr != _agi.get());
123  return *_agi;
124  }

◆ get_c()

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_c ( ) const
inline
Returns
The C matrix.

Definition at line 129 of file nemeco/jade.settings.hpp.

130  {
131  return _c;
132  }

◆ get_f() [1/4]

template<typename TValue >
matrix_type& jade::basic_settings< TValue >::get_f ( )
inline
Returns
The F matrix.

Definition at line 141 of file cpax/jade.settings.hpp.

142  {
143  return _f;
144  }

◆ get_f() [2/4]

template<typename TValue >
matrix_type& jade::basic_settings< TValue >::get_f ( )
inline
Returns
The F matrix.

Definition at line 141 of file qpas/jade.settings.hpp.

142  {
143  return _f;
144  }

◆ get_f() [3/4]

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_f ( ) const
inline
Returns
The F matrix.

Definition at line 133 of file cpax/jade.settings.hpp.

134  {
135  return _f;
136  }

◆ get_f() [4/4]

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_f ( ) const
inline
Returns
The F matrix.

Definition at line 133 of file qpas/jade.settings.hpp.

134  {
135  return _f;
136  }

◆ get_fg() [1/2]

template<typename TValue >
const forced_grouping_type* jade::basic_settings< TValue >::get_fg ( ) const
inline
Returns
A pointer to the forced grouping file or nullptr if the information is not available.

Definition at line 158 of file cpax/jade.settings.hpp.

159  {
160  return _fg.get();
161  }
+ Here is the caller graph for this function:

◆ get_fg() [2/2]

template<typename TValue >
const forced_grouping_type* jade::basic_settings< TValue >::get_fg ( ) const
inline
Returns
A pointer to the forced grouping file or nullptr if the information is not available.

Definition at line 158 of file qpas/jade.settings.hpp.

159  {
160  return _fg.get();
161  }

◆ get_fif() [1/2]

template<typename TValue >
const matrix_type* jade::basic_settings< TValue >::get_fif ( ) const
inline
Returns
The Fin-force matrix.

Definition at line 149 of file cpax/jade.settings.hpp.

150  {
151  return _fif.get();
152  }
+ Here is the caller graph for this function:

◆ get_fif() [2/2]

template<typename TValue >
const matrix_type* jade::basic_settings< TValue >::get_fif ( ) const
inline
Returns
The Fin-force matrix.

Definition at line 149 of file qpas/jade.settings.hpp.

150  {
151  return _fif.get();
152  }

◆ get_g() [1/2]

template<typename TValue >
const genotype_matrix_type& jade::basic_settings< TValue >::get_g ( ) const
inline
Returns
The genotype matrix.

Definition at line 166 of file cpax/jade.settings.hpp.

167  {
168  return *_g;
169  }
+ Here is the caller graph for this function:

◆ get_g() [2/2]

template<typename TValue >
const genotype_matrix_type& jade::basic_settings< TValue >::get_g ( ) const
inline
Returns
The genotype matrix.

Definition at line 166 of file qpas/jade.settings.hpp.

167  {
168  return *_g;
169  }

◆ get_mu()

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_mu ( ) const
inline
Returns
The mu vector.

Definition at line 137 of file nemeco/jade.settings.hpp.

138  {
139  return _mu;
140  }

◆ get_options() [1/3]

template<typename TValue >
const options_type& jade::basic_settings< TValue >::get_options ( ) const
inline
Returns
The options.

Definition at line 174 of file cpax/jade.settings.hpp.

175  {
176  return _opts;
177  }
+ Here is the caller graph for this function:

◆ get_options() [2/3]

template<typename TValue >
const options_type& jade::basic_settings< TValue >::get_options ( ) const
inline
Returns
The options.

Definition at line 145 of file nemeco/jade.settings.hpp.

146  {
147  return _opts;
148  }

◆ get_options() [3/3]

template<typename TValue >
const options_type& jade::basic_settings< TValue >::get_options ( ) const
inline
Returns
The options.

Definition at line 174 of file qpas/jade.settings.hpp.

175  {
176  return _opts;
177  }

◆ get_q() [1/4]

template<typename TValue >
matrix_type& jade::basic_settings< TValue >::get_q ( )
inline
Returns
The Q matrix.

Definition at line 190 of file cpax/jade.settings.hpp.

191  {
192  return _q;
193  }

◆ get_q() [2/4]

template<typename TValue >
matrix_type& jade::basic_settings< TValue >::get_q ( )
inline
Returns
The Q matrix.

Definition at line 190 of file qpas/jade.settings.hpp.

191  {
192  return _q;
193  }

◆ get_q() [3/4]

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_q ( ) const
inline
Returns
The Q matrix.

Definition at line 182 of file cpax/jade.settings.hpp.

183  {
184  return _q;
185  }

◆ get_q() [4/4]

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_q ( ) const
inline
Returns
The Q matrix.

Definition at line 182 of file qpas/jade.settings.hpp.

183  {
184  return _q;
185  }

◆ get_randomizer() [1/2]

template<typename TValue >
const randomizer_type& jade::basic_settings< TValue >::get_randomizer ( ) const
inline
Returns
The randomizer.

Definition at line 198 of file cpax/jade.settings.hpp.

199  {
200  return _rnd;
201  }

◆ get_randomizer() [2/2]

template<typename TValue >
const randomizer_type& jade::basic_settings< TValue >::get_randomizer ( ) const
inline
Returns
The randomizer.

Definition at line 198 of file qpas/jade.settings.hpp.

199  {
200  return _rnd;
201  }

◆ get_rf()

template<typename TValue >
const matrix_type& jade::basic_settings< TValue >::get_rf ( ) const
inline
Returns
The rooted F matrix.

Definition at line 153 of file nemeco/jade.settings.hpp.

154  {
155  return _rf;
156  }

The documentation for this class was generated from the following file:
jade::basic_verification::validate_c
static bool validate_c(const matrix_type &c)
Validates the C matrix and throws an exception if validation fails.
Definition: jade.verification.hpp:38
jade::basic_settings::forced_grouping_type
basic_forced_grouping< value_type > forced_grouping_type
The forced grouping type.
Definition: cpax/jade.settings.hpp:31
jade::basic_genotype_matrix_factory::create
static genotype_matrix_type * create(const std::string &path)
Creates a genotype matrix based on values from a file. This function determines what kind of genotype...
Definition: jade.genotype_matrix_factory.hpp:48
jade::basic_randomizer::get_engine
std::default_random_engine & get_engine()
Definition: jade.randomizer.hpp:42
jade::basic_options::get_ksize
size_t get_ksize() const
Definition: cpax/jade.options.hpp:185
jade::basic_settings::g_ptr
std::unique_ptr< genotype_matrix_type > g_ptr
The genotype matrix pointer type.
Definition: cpax/jade.settings.hpp:52
jade::basic_verification::validate_gf_sizes
static bool validate_gf_sizes(const genotype_matrix_type &g, const matrix_type &f)
Validates the sizes of the G and F matrices and throws an exception if validation fails.
Definition: jade.verification.hpp:177
jade::basic_matrix::resize
void resize(const size_t height, const size_t width)
Resizes the matrix to the specified dimensions. The values of the matrix are not reset.
Definition: jade.matrix.hpp:1135
jade::basic_matrix::get_width
size_t get_width() const
Definition: jade.matrix.hpp:757
jade::basic_settings::create_c
static matrix_type create_c(const matrix_type &rf)
Creates the covariance matrix.
Definition: nemeco/jade.settings.hpp:162
jade::basic_settings::create_rf
static matrix_type create_rf(const matrix_type &f)
Creates the rooted F matrix.
Definition: nemeco/jade.settings.hpp:214
jade::basic_randomizer::randomize_q
matrix_type randomize_q(const size_t I, const size_t K)
Definition: jade.randomizer.hpp:123
jade::basic_options::is_fin_force_specified
bool is_fin_force_specified() const
Definition: cpax/jade.options.hpp:262
jade::basic_settings::value_type
TValue value_type
The value type.
Definition: cpax/jade.settings.hpp:25
jade::basic_verification::validate_fc_sizes
static bool validate_fc_sizes(const matrix_type &f, const matrix_type &c)
Validates the sizes of the F and C matrices and throws an exception if validation fails.
Definition: jade.verification.hpp:114
jade::basic_verification::validate_f
static bool validate_f(const matrix_type &f)
Validates the F matrix and throws an exception if validation fails.
Definition: jade.verification.hpp:73
jade::basic_matrix::read
void read(const std::string &path)
Reads the matrix values from the specified file.
Definition: jade.matrix.hpp:1059
jade::basic_randomizer::randomize_f
matrix_type randomize_f(const size_t K, const matrix_type &mu)
Definition: jade.randomizer.hpp:50
jade::basic_options::is_tin_specified
bool is_tin_specified() const
Definition: nemeco/jade.options.hpp:214
jade::basic_options::get_fin_force
const std::string & get_fin_force() const
Definition: cpax/jade.options.hpp:158
jade::basic_options::is_ain_specified
bool is_ain_specified() const
Definition: nemeco/jade.options.hpp:166
jade::basic_matrix::get_height
size_t get_height() const
Definition: jade.matrix.hpp:603
jade::basic_options::get_fin
const std::string & get_fin() const
Definition: cpax/jade.options.hpp:149
jade::basic_settings::agi_reader_type
basic_agi_reader< value_type > agi_reader_type
The admixture graph input reader.
Definition: nemeco/jade.settings.hpp:27
jade::basic_verification::validate_gqf_sizes
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.
Definition: jade.verification.hpp:211
jade::basic_options::is_fin_specified
bool is_fin_specified() const
Definition: cpax/jade.options.hpp:254
jade::basic_options::get_ain
const std::string & get_ain() const
Definition: nemeco/jade.options.hpp:86
jade::basic_verification::validate_q
static bool validate_q(const matrix_type &q)
Validates the Q matrix and throws an exception if validation fails.
Definition: jade.verification.hpp:225
jade::basic_options::is_cin_specified
bool is_cin_specified() const
Definition: nemeco/jade.options.hpp:174
jade::basic_options::is_force_specified
bool is_force_specified() const
Definition: cpax/jade.options.hpp:286
jade::basic_options::get_cin
const std::string & get_cin() const
Definition: nemeco/jade.options.hpp:95
jade::basic_verification::validate_g
static bool validate_g(const genotype_matrix_type &g)
Validates the G matrix and throws an exception if validation fails.
Definition: jade.verification.hpp:158
jade::basic_options::is_qin_specified
bool is_qin_specified() const
Definition: cpax/jade.options.hpp:326
jade::basic_error
A template for a class representing an exception thrown from this namespace.
Definition: jade.error.hpp:20
jade::basic_options::get_force
const std::string & get_force() const
Definition: cpax/jade.options.hpp:167
jade::basic_options::get_qin
const std::string & get_qin() const
Definition: cpax/jade.options.hpp:212
jade::basic_verification::validate_fif_size
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.
Definition: jade.verification.hpp:131
jade::basic_options::get_f_epsilon
value_type get_f_epsilon() const
Definition: cpax/jade.options.hpp:141
jade::basic_options::get_seed
seed_type get_seed() const
Definition: cpax/jade.options.hpp:230
jade::basic_settings::matrix_type
basic_matrix< value_type > matrix_type
The matrix type.
Definition: cpax/jade.settings.hpp:28