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

A template for an abstract class implementing operations for a genotype matrix. More...

#include <jade.genotype_matrix.hpp>

+ Inheritance diagram for jade::basic_genotype_matrix< TValue >:
+ Collaboration diagram for jade::basic_genotype_matrix< TValue >:

Public Types

typedef TValue value_type
 The value type. More...
 
typedef basic_matrix< TValue > matrix_type
 The matrix type. More...
 
typedef basic_discrete_genotype_matrix< value_typedgm_type
 The discrete genotype matrix type. More...
 
typedef basic_likelihood_genotype_matrix< value_typelgm_type
 The likelihood genotype matrix type. More...
 

Public Member Functions

virtual ~basic_genotype_matrix ()
 Reclaims resources used by the class and derived classes. More...
 
virtual void compute_derivatives_f (const matrix_type &q, const matrix_type &fa, const matrix_type &fb, const matrix_type &qfa, const matrix_type &qfb, const size_t j, matrix_type &d_vec, matrix_type &h_mat) const =0
 Computes the derivative vector and hessian matrix for a specified marker of the F matrix. More...
 
virtual void compute_derivatives_q (const matrix_type &q, const matrix_type &fa, const matrix_type &fb, const matrix_type &qfa, const matrix_type &qfb, const size_t i, matrix_type &d_vec, matrix_type &h_mat) const =0
 Computes the derivative vector and hessian matrix for a specified individual of the Q matrix. More...
 
virtual value_type compute_lle (const matrix_type &q, const matrix_type &fa, const matrix_type &fb, const matrix_type &qfa, const matrix_type &qfb) const =0
 
virtual matrix_type create_mu (const value_type f_epsilon) const =0
 
virtual size_t get_height () const =0
 
virtual std::string get_size_str () const =0
 
virtual size_t get_width () const =0
 
virtual std::string str () const =0
 

Protected Member Functions

 basic_genotype_matrix ()
 Initializes a new instance of the class. More...
 

Detailed Description

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

A template for an abstract class implementing operations for a genotype matrix.

Definition at line 25 of file jade.genotype_matrix.hpp.

Member Typedef Documentation

◆ dgm_type

template<typename TValue >
typedef basic_discrete_genotype_matrix<value_type> jade::basic_genotype_matrix< TValue >::dgm_type

The discrete genotype matrix type.

Definition at line 35 of file jade.genotype_matrix.hpp.

◆ lgm_type

template<typename TValue >
typedef basic_likelihood_genotype_matrix<value_type> jade::basic_genotype_matrix< TValue >::lgm_type

The likelihood genotype matrix type.

Definition at line 38 of file jade.genotype_matrix.hpp.

◆ matrix_type

template<typename TValue >
typedef basic_matrix<TValue> jade::basic_genotype_matrix< TValue >::matrix_type

The matrix type.

Definition at line 32 of file jade.genotype_matrix.hpp.

◆ value_type

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

The value type.

Definition at line 29 of file jade.genotype_matrix.hpp.

Constructor & Destructor Documentation

◆ ~basic_genotype_matrix()

template<typename TValue >
virtual jade::basic_genotype_matrix< TValue >::~basic_genotype_matrix ( )
inlinevirtual

Reclaims resources used by the class and derived classes.

Definition at line 43 of file jade.genotype_matrix.hpp.

44  {
45  }

◆ basic_genotype_matrix()

template<typename TValue >
jade::basic_genotype_matrix< TValue >::basic_genotype_matrix ( )
inlineprotected

Initializes a new instance of the class.

Definition at line 145 of file jade.genotype_matrix.hpp.

146  {
147  }

Member Function Documentation

◆ compute_derivatives_f()

template<typename TValue >
virtual void jade::basic_genotype_matrix< TValue >::compute_derivatives_f ( const matrix_type q,
const matrix_type fa,
const matrix_type fb,
const matrix_type qfa,
const matrix_type qfb,
const size_t  j,
matrix_type d_vec,
matrix_type h_mat 
) const
pure virtual

Computes the derivative vector and hessian matrix for a specified marker of the F matrix.

Parameters
qThe Q matrix.
faThe F matrix.
fbThe 1-F matrix.
qfaThe Q*F product.
qfbThe Q*(1-F) product.
jThe marker.
d_vecThe derivative vector.
h_matThe hessian matrix.
+ Here is the caller graph for this function:

◆ compute_derivatives_q()

template<typename TValue >
virtual void jade::basic_genotype_matrix< TValue >::compute_derivatives_q ( const matrix_type q,
const matrix_type fa,
const matrix_type fb,
const matrix_type qfa,
const matrix_type qfb,
const size_t  i,
matrix_type d_vec,
matrix_type h_mat 
) const
pure virtual

Computes the derivative vector and hessian matrix for a specified individual of the Q matrix.

Parameters
qThe Q matrix.
faThe F matrix.
fbThe 1-F matrix.
qfaThe Q*F product.
qfbThe Q*(1-F) product.
iThe individual.
d_vecThe derivative vector.
h_matThe hessian matrix.
+ Here is the caller graph for this function:

◆ compute_lle()

template<typename TValue >
virtual value_type jade::basic_genotype_matrix< TValue >::compute_lle ( const matrix_type q,
const matrix_type fa,
const matrix_type fb,
const matrix_type qfa,
const matrix_type qfb 
) const
pure virtual
Returns
The log of the likelihood function.
Parameters
qThe Q matrix.
faThe F matrix for major alleles.
fbThe F matrix for minor alleles.
qfaThe Q*Fa product.
qfbThe Q*Fb product.

◆ create_mu()

template<typename TValue >
virtual matrix_type jade::basic_genotype_matrix< TValue >::create_mu ( const value_type  f_epsilon) const
pure virtual
Returns
A new mu matrix.
Parameters
f_epsilonThe F matrix boundary epsilon.

Implemented in jade::basic_discrete_genotype_matrix< TValue >.

◆ get_height()

template<typename TValue >
virtual size_t jade::basic_genotype_matrix< TValue >::get_height ( ) const
pure virtual
Returns
The height of the matrix.

Implemented in jade::basic_discrete_genotype_matrix< TValue >.

+ Here is the caller graph for this function:

◆ get_size_str()

template<typename TValue >
virtual std::string jade::basic_genotype_matrix< TValue >::get_size_str ( ) const
pure virtual
Returns
The string representation of the size of the matrix.

Implemented in jade::basic_discrete_genotype_matrix< TValue >.

+ Here is the caller graph for this function:

◆ get_width()

template<typename TValue >
virtual size_t jade::basic_genotype_matrix< TValue >::get_width ( ) const
pure virtual
Returns
The width of the matrix.

Implemented in jade::basic_discrete_genotype_matrix< TValue >.

+ Here is the caller graph for this function:

◆ str()

template<typename TValue >
virtual std::string jade::basic_genotype_matrix< TValue >::str ( ) const
pure virtual
Returns
The string representation of the matrix.

Implemented in jade::basic_discrete_genotype_matrix< TValue >.


The documentation for this class was generated from the following file: