# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

buildA_kerr_cpp <- function(s, d, w, v) {
    .Call(`_AGHmatrix_buildA_kerr_cpp`, s, d, w, v)
}

buildA_ploidy2_cpp <- function(sire, dire, n) {
    .Call(`_AGHmatrix_buildA_ploidy2_cpp`, sire, dire, n)
}

buildA_slater_cpp <- function(s, d, w) {
    .Call(`_AGHmatrix_buildA_slater_cpp`, s, d, w)
}

ascii_to_number <- function(pedigree_data, unk = "0") {
    .Call(`_AGHmatrix_ascii_to_number`, pedigree_data, unk)
}

check_matrix <- function(obj) {
    invisible(.Call(`_AGHmatrix_check_matrix`, obj))
}

datatreat_cpp <- function(data, n_max = 50L, unk = "0", save = FALSE) {
    .Call(`_AGHmatrix_datatreat_cpp`, data, n_max, unk, save)
}

diploid_p0p2_TwoPQ_cpp <- function(M) {
    .Call(`_AGHmatrix_diploid_p0p2_TwoPQ_cpp`, M)
}

buildDominanceMatrix_cpp <- function(A, s, d) {
    .Call(`_AGHmatrix_buildDominanceMatrix_cpp`, A, s, d)
}

Gmatrix_Endelman <- function(M, ploidy) {
    .Call(`_AGHmatrix_Gmatrix_Endelman`, M, ploidy)
}

Gmatrix_MarkersMask <- function(M) {
    .Call(`_AGHmatrix_Gmatrix_MarkersMask`, M)
}

Gmatrix_Slater <- function(M, Frequency, FreqP, NumberMarkers) {
    .Call(`_AGHmatrix_Gmatrix_Slater`, M, Frequency, FreqP, NumberMarkers)
}

Gmatrix_Su <- function(M) {
    .Call(`_AGHmatrix_Gmatrix_Su`, M)
}

Gmatrix_vanraden <- function(M, FreqP, denom) {
    .Call(`_AGHmatrix_Gmatrix_vanraden`, M, FreqP, denom)
}

Gmatrix_VanRaden_weighted <- function(M, weights, FreqP, denom) {
    .Call(`_AGHmatrix_Gmatrix_VanRaden_weighted`, M, weights, FreqP, denom)
}

Gmatrix_vanraden_poly_unweighted <- function(X, ploidy, ratio, ploidy_correction) {
    .Call(`_AGHmatrix_Gmatrix_vanraden_poly_unweighted`, X, ploidy, ratio, ploidy_correction)
}

Gmatrix_vanraden_poly_weighted <- function(X, w, ploidy, ratio, ploidy_correction) {
    .Call(`_AGHmatrix_Gmatrix_vanraden_poly_weighted`, X, w, ploidy, ratio, ploidy_correction)
}

Gmatrix_Vitezica <- function(M, FreqP) {
    .Call(`_AGHmatrix_Gmatrix_Vitezica`, M, FreqP)
}

#' Compute Martini block corrections (H11, H12, H21, H22 - A22)
#'
#' @param A12 n1 x n2 block from A
#' @param A22 n2 x n2 block from A (genotyped)
#' @param G22 n2 x n2 block from G (genotyped)
#' @param tau scalar
#' @param omega scalar
#' @return list(H11, H12, H21, H22corr) where H22corr = H22 - A22
H_martini_blocks <- function(A12, A22, G22, tau, omega) {
    .Call(`_AGHmatrix_H_martini_blocks`, A12, A22, G22, tau, omega)
}

#' Compute var/mean of G by classes of rounded A, and fill varA/meanG
#'
#' @param G square matrix
#' @param A square matrix (same dim as G)
#' @param round_digits integer number of decimal places to round A
#' @return list(varA, meanG, classes, var_by_class, mean_by_class)
munoz_var_mean_by_Aclass <- function(G, A, round_digits) {
    .Call(`_AGHmatrix_munoz_var_mean_by_Aclass`, G, A, round_digits)
}

slater_par_cpp <- function(X, ploidy) {
    .Call(`_AGHmatrix_slater_par_cpp`, X, ploidy)
}

