# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Perform reduced-rank extrapolation
#'
#' This method removes any geometric terms from a sequence, leaving
#' you with the limit. Note, as in the examples, that it will happily
#' remove divergent sequences. This is a feature rather than a bug.
#' @param sequence a matrix, the columns of which are the sequence to
#' accelerate
#' @return the RRE limit
#' @examples
#' ind <- seq_len(5)
#' vals <- 0.5^(ind - 1)
#' rre(matrix(vals, nrow=1))
#' rre(rbind(vals, 2 + vals))
#' @references
#' Eddy, R.P. (1979), Extrapolation to the limit of a vector
#' sequence, in Wang, P.C.C., ed, Information Linkage Between
#' Applied Mathematics and Industry, pp 387-396.
#'
#' Mesina, M. (1977), Convergence acceleration for the iterative solution
#' of x=Ax + f, Methods Appl. Mech. Eng. 10, 165--173.
#'
#' Jbilou, K., and Sadok, H. (1995), Analysis of some vector extrapolation
#' methods for solving systems of linear equations, Numer. Math.
#' 70, 73--89.
#' @export
rre <- function(sequence) {
.Call('_extrapolatr_rre', PACKAGE = 'extrapolatr', sequence)
}
#' Perform minimal polynomial extrapolation
#'
#' This method removes any geometric terms from a sequence, leaving
#' you with the limit. Note, as in the examples, that it will happily
#' remove divergent sequences. This is a feature rather than a bug.
#' @param sequence a matrix, the columns of which are the sequence to
#' accelerate
#' @return the MPE limit
#' @examples
#' ind <- seq_len(5)
#' vals <- 0.5^(ind - 1)
#' mpe(matrix(vals, nrow=1))
#' mpe(rbind(vals, 2 + vals))
#' @references
#' Cabay, S. and Jackson, L.W. (1976), A polynomial extrapolation method
#' for finding limits and antilimits for vector sequences, SIAM J.
#' Numer. Anal. 13, 734--752.
#' @export
mpe <- function(sequence) {
.Call('_extrapolatr_mpe', PACKAGE = 'extrapolatr', sequence)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.