Skip to content

Commit

Permalink
Returns either Vandermonde or Chebyshev based on passed basis parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadler committed May 12, 2024
1 parent f15c52f commit f47a8f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/RemezPolynomial.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright Avraham Adler (c) 2023
# SPDX-License-Identifier: MPL-2.0+

# Function to create augmented Vandermonde matrix for polynomial approximation.
# Function to create augmented Vandermonde or Chebyshev matrix for polynomial
# approximation.
polyMat <- function(x, y, relErr, basis) {
n <- length(x)
matFunc <- switch(EXPR = basis, m = vanderMat, chebMat)
Expand Down
3 changes: 2 additions & 1 deletion R/RemezRational.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright Avraham Adler (c) 2023
# SPDX-License-Identifier: MPL-2.0+

# Function to create augmented Vandermonde matrix for rational approximation.
# Function to create augmented Vandermonde or Chebyshev matrix for rational
# approximation.
ratMat <- function(x, E, y, nD, dD, relErr, basis) {
altSgn <- (-1) ^ (seq_along(x) - 1L)
# For relative error, need to weight the E by f(x).
Expand Down

0 comments on commit f47a8f1

Please sign in to comment.