R/RcppExports.R

Defines functions inner_product_matrix_splines

Documented in inner_product_matrix_splines

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

#' Letting knot1 < knot2, this function computes \int_knot2^to p1(x-knot1) p2(x-knot2) dx
#' where p1 and p2 are third order polynomials with coefficients coef1 and coef2 respectively.
#' If knot2 > knot1 the labels are switched.
#'
#' @param knot1,knot2 shift values of the polynomials.
#' @param to upper limit of the integral.
#' @param coef1,coef2 coefficients of the third order polynomials.
#' @return the integral as described above.
NULL

#' Computes the integral of the product of two natural cubic splines with knot
#'  sequences knots_1 and knots_2 and coefficient matrices coef_1 and coef_2
#'  from the splines::interpSpline function in R. The splines are assumed to live
#'  in a function space on the interval [from, to].
#'
#' @param knots_1,knots_2 knot sequences for the natural cubic splines.
#' @param coef_1,coef_2 coefficient matrices for the natural cubic splines.
#' @param from,to limits of integration.
#' @return the inner product of the splines.
NULL

#' Computes the matrix of L2 inner products of the splines given in list_of_splines
#' as produced by splines::interpSpline. The splines are assumed to be
#' functions on the interval [from, to].
#'
#' @param list_of_splines list of interpSpline objects.
#' @param from,to limits of integration.
#' @return matrix of inner products.
inner_product_matrix_splines <- function(list_of_splines, from, to) {
    .Call(`_ghcm_inner_product_matrix_splines`, list_of_splines, from, to)
}

Try the ghcm package in your browser

Any scripts or data that you put into this service are public.

ghcm documentation built on Nov. 2, 2023, 5:48 p.m.