Skip to content

Commit

Permalink
Was only use of "n" (unlike Polynomial) since we pass nD and dD, so s…
Browse files Browse the repository at this point in the history
…ave one call and variable allocation/initialization.
  • Loading branch information
Avraham Adler committed Feb 26, 2024
1 parent da6559d commit ccf5866
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/RemezRational.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

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

0 comments on commit ccf5866

Please sign in to comment.