R/RcppExports.R

Defines functions parInnProd days_in_bin_daily_par days_in_bin_daily days_in_bin_one spl3_band_daily_par spl3_band_daily spl3_one spl1_band_daily_par spl1_band_daily spl1_one sin_cubed_int_estimate sin_int_estimate sin_estimate sin_poly_temp_par sin_poly_temp sin_poly_temp_one sin_int_estimate_NumericVector sin_estimate_NumericVectorxtmintmax sin_estimate_NumericVector

Documented in days_in_bin_daily parInnProd sin_estimate_NumericVector spl1_band_daily spl3_band_daily

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

#' @title Sine function with max and min given.
#' @description Sine function evaluated at x for single sine interpolation.
#' @param x Vector of x values in [0, 1] to evaluate at.
#' @param tmin \code{double} tmin value.
#' @param tmax \code{double} tmax value.
#' @return Vector of interpolated sine values.
sin_estimate_NumericVector <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_estimate_NumericVector', PACKAGE = 'degreedays', x, tmin, tmax)
}

#' @title Sine function with max and min given.
#' @description Sine function evaluated at x for single sine interpolation.
#' @param x Vector of x values in [0, 1] to evaluate at.
#' @param tmin \code{double} tmin value.
#' @param tmax \code{double} tmax value.
#' @return Vector of interpolated sine values.
sin_estimate_NumericVectorxtmintmax <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_estimate_NumericVectorxtmintmax', PACKAGE = 'degreedays', x, tmin, tmax)
}

sin_int_estimate_NumericVector <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_int_estimate_NumericVector', PACKAGE = 'degreedays', x, tmin, tmax)
}

sin_poly_temp_one <- function(tmin, tmax, degree, weight) {
    .Call('_degreedays_sin_poly_temp_one', PACKAGE = 'degreedays', tmin, tmax, degree, weight)
}

sin_poly_temp <- function(tmin, tmax, degree, weights) {
    .Call('_degreedays_sin_poly_temp', PACKAGE = 'degreedays', tmin, tmax, degree, weights)
}

sin_poly_temp_par <- function(tmin, tmax, degree, weights) {
    .Call('_degreedays_sin_poly_temp_par', PACKAGE = 'degreedays', tmin, tmax, degree, weights)
}

sin_estimate <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_estimate', PACKAGE = 'degreedays', x, tmin, tmax)
}

sin_int_estimate <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_int_estimate', PACKAGE = 'degreedays', x, tmin, tmax)
}

sin_cubed_int_estimate <- function(x, tmin, tmax) {
    .Call('_degreedays_sin_cubed_int_estimate', PACKAGE = 'degreedays', x, tmin, tmax)
}

spl1_one <- function(t0, t1, tmin, tmax, weight) {
    .Call('_degreedays_spl1_one', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weight)
}

#' @title Calculate degree days/degree-1 splines for daily data.
#' @description Calculate degree days/degree-1 splines for daily data using C++ code.
#' @param t0 vector of lower bounds
#' @param t1 vector of upper bounds
#' @param tmin vector of tmin values (1 per day)
#' @param tmax vector of tmax values (1 per day)
#' @param tmax vector of tmax values (1 per day)
#' @param weights vector of optional weights to multiply output by. Default is 1.
#' @return num_days x num_bins \code{matrix}
spl1_band_daily <- function(t0, t1, tmin, tmax, weights) {
    .Call('_degreedays_spl1_band_daily', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weights)
}

spl1_band_daily_par <- function(t0, t1, tmin, tmax, weights) {
    .Call('_degreedays_spl1_band_daily_par', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weights)
}

spl3_one <- function(t0, tmin, tmax, weight) {
    .Call('_degreedays_spl3_one', PACKAGE = 'degreedays', t0, tmin, tmax, weight)
}

#' @title Calculate degree days/degree-3 splines for daily data.
#' @description Calculate degree days/degree-3 splines for daily data using C++ code.
#' @param t0 vector of lower bounds
#' @param tmin vector of tmin values (1 per day)
#' @param tmax vector of tmax values (1 per day)
#' @param tmax vector of tmax values (1 per day)
#' @param weights vector of optional weights to multiply output by. Default is 1.
#' @return num_days x num_bands \code{matrix}
spl3_band_daily <- function(t0, tmin, tmax, weights) {
    .Call('_degreedays_spl3_band_daily', PACKAGE = 'degreedays', t0, tmin, tmax, weights)
}

spl3_band_daily_par <- function(t0, tmin, tmax, weights) {
    .Call('_degreedays_spl3_band_daily_par', PACKAGE = 'degreedays', t0, tmin, tmax, weights)
}

days_in_bin_one <- function(t0, t1, tmin, tmax, weight) {
    .Call('_degreedays_days_in_bin_one', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weight)
}

#' @title Calculate days in bin for daily data.
#' @description Calculate days in bin for daily data using C++ code.
#' @param t0 vector of lower bounds
#' @param t1 vector of upper bounds
#' @param tmin vector of tmin values (1 per day)
#' @param tmax vector of tmax values (1 per day)
#' @return num_days x num_bins \code{matrix}
days_in_bin_daily <- function(t0, t1, tmin, tmax, weights) {
    .Call('_degreedays_days_in_bin_daily', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weights)
}

days_in_bin_daily_par <- function(t0, t1, tmin, tmax, weights) {
    .Call('_degreedays_days_in_bin_daily_par', PACKAGE = 'degreedays', t0, t1, tmin, tmax, weights)
}

#' @title Inner product calculator
#' @export
parInnProd <- function(x, y) {
    .Call('_degreedays_parInnProd', PACKAGE = 'degreedays', x, y)
}
kendonB/degreedays documentation built on Oct. 3, 2020, 9:15 p.m.