Description Usage Arguments Details Value Examples

View source: R/Orthogonal_polynomials.R

Generate sets of polynomials orthogonal with respect to a general inner product. The inner product is specified by an R function of (at least) two polynomial arguments.

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`inner_product` |
An R function of two |

`degree` |
A non-negative integer specifying the maximum degree |

`norm` |
Logical: should the polynomials be normalized? |

`...` |
additional arguments passed on to the inner product function |

`p, q` |
Polynomials |

`alpha, beta` |
Family parameters for the Jacobi polynomials |

`x` |
numeric vector defining discrete orthogonal polynomials |

`w` |
a weight function for discrete orthogonal polynomials |

Discrete orthogonal polynomials, equally or unequally weighted,
are included as special cases. See the `Discrete`

inner
product function.

Computations are done using the recurrence relation with computed coefficients. If the algebraic expressions for these recurrence relation coefficients are known the computation can be made much more efficient.

A `"polylist"`

object containing the orthogonal set

1 2 3 4 5 6 7 8 | ```
(P0 <- poly_orth(0:5, norm = FALSE))
(P1 <- poly_orth_general(Discrete, degree = 5, x = 0:5, norm = FALSE))
sapply(P0-P1, function(x) max(abs(coef(x)))) ## visual check for equality
(P0 <- poly_orth_general(Legendre, 5))
### should be same as P0, up to roundoff
(P1 <- poly_orth_general(Jacobi, 5, alpha = 0, beta = 0))
### check
sapply(P0-P1, function(x) max(abs(coef(x))))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.