Polynomial overview
Adapted from: https://pursuit.purescript.org/packages/purescript-polynomials/1.0.1/docs/Data.Polynomial#t:Polynomial
Added in v1.0.0
Table of contents
- Constructors
- Destructors
- Instance Operations
- Instances
- Internal
- Model
- Polynomial Operations
- Utilities
Constructors
fromCoefficientArray
Signature
export declare const fromCoefficientArray: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => (rs: readonly R[]) => Polynomial<R>
Added in v1.0.0
one
Signature
export declare const one: <R>(R: Rng.Ring<R>) => Polynomial<R>
Added in v1.0.0
randPolynomial
Signature
export declare const randPolynomial: <R>(terms: number, make: IO.IO<R>) => IO.IO<Polynomial<R>>
Added in v1.0.0
zero
Signature
export declare const zero: <R>() => Polynomial<R>
Added in v1.0.0
Destructors
coefficients
Signature
export declare const coefficients: <R>(p: Polynomial<R>) => readonly R[]
Added in v1.0.0
Instance Operations
add
Signature
export declare const add: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => (x: Polynomial<R>, y: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
map
Signature
export declare const map: <A, B>(f: (a: A) => B) => (fa: Polynomial<A>) => Polynomial<B>
Added in v1.0.0
mapWithIndex
Signature
export declare const mapWithIndex: <A, B>(f: (i: number, a: A) => B) => (fa: Polynomial<A>) => Polynomial<B>
Added in v1.0.0
mul
Signature
export declare const mul: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => (xs: Polynomial<R>, ys: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
sub
Signature
export declare const sub: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => (x: Polynomial<R>, y: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
Instances
Functor
Signature
export declare const Functor: Fun.Functor1<'Polynomial'>
Added in v1.0.0
FunctorWithIndex
Signature
export declare const FunctorWithIndex: FunI.FunctorWithIndex1<'Polynomial', number>
Added in v1.0.0
URI
Signature
export declare const URI: 'Polynomial'
Added in v1.0.0
URI (type alias)
Signature
export type URI = typeof URI
Added in v1.0.0
getAdditiveAbelianGroup
Signature
export declare const getAdditiveAbelianGroup: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => TC.AbelianGroup<Polynomial<R>>
Added in v1.0.0
getBimodule
Signature
export declare const getBimodule: <R>(E: Eq.Eq<R>, R: Rng.Ring<R>) => TC.Bimodule<Polynomial<R>, R, R>
Added in v1.0.0
getCommutativeRing
Signature
export declare const getCommutativeRing: <R>(E: Eq.Eq<R>, R: Rng.Ring<R>) => TC.CommutativeRing<Polynomial<R>>
Added in v1.0.0
getCompositionMonoid
Signature
export declare const getCompositionMonoid: <R>(Eq_: Eq.Eq<R>, R: Rng.Ring<R>) => Monoid<Polynomial<R>>
Added in v1.0.0
getCompositionSemigroup
Signature
export declare const getCompositionSemigroup: <R>(Eq_: Eq.Eq<R>, R: Rng.Ring<R>) => Semigroup<Polynomial<R>>
Added in v1.0.0
getEuclidianRing
Signature
export declare const getEuclidianRing: <F>(E: Eq.Eq<F>, F: Fld.Field<F>) => TC.EuclidianRing<Polynomial<F>>
Added in v1.0.0
getPolynomialEq
Signature
export declare const getPolynomialEq: <R>(Eq: Eq.Eq<R>) => Eq.Eq<Polynomial<R>>
Added in v1.0.0
getPolynomialOrd
Signature
export declare const getPolynomialOrd: <R>(Eq: Ord.Ord<R>) => Ord.Ord<Polynomial<R>>
Added in v1.0.0
getShow
Signature
export declare const getShow: (
variable: string
) => <A>(S: Show<A>, isZero: (a: A) => boolean, isOne: (a: A) => boolean) => Show<Polynomial<A>>
Added in v1.0.0
Internal
shiftBy
Signature
export declare const shiftBy: <R>(n: number, r: R) => (p: readonly R[]) => readonly R[]
Added in v1.0.0
Model
Polynomial (interface)
Signature
export interface Polynomial<R> extends ReadonlyArray<R> {
_URI: PolynomialSymbol
}
Added in v1.0.0
Polynomial Operations
antiderivative
Signature
export declare const antiderivative: <R>(
constantTerm: R,
scaleLeft: (n: number, r: R) => R
) => (p: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
constant
Signature
export declare const constant: <R>(Eq: Eq.Eq<R>, R: Rng.Ring<R>) => (a: R) => Polynomial<R>
Added in v1.0.0
derivative
Signature
export declare const derivative: <R>(scaleLeft: (n: number, r: R) => R) => (coeffs: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
evaluate
Signature
export declare const evaluate: <R>(R: Rng.Ring<R>) => (p: Polynomial<R>) => (x: R) => R
Added in v1.0.0
identity
Signature
export declare const identity: <R>(R: Rng.Ring<R>) => Polynomial<R>
Added in v1.0.0
integrate
Signature
export declare const integrate: <R>(
R: Rng.Ring<R>,
scaleLeft: (n: number, r: R) => R
) => (lower: R, upper: R) => (p: Polynomial<R>) => R
Added in v1.0.0
l2InnerProduct
Signature
export declare const l2InnerProduct: <R extends number | Complex>(
Eq_: Eq.Eq<R>,
R: Rng.Ring<R>,
scaleLeft: (n: number, r: R) => R,
conj: (r: R) => R
) => (p: Polynomial<R>, q: Polynomial<R>) => R
Added in v1.0.0
norm
Signature
export declare const norm: <R extends number | Complex>(
Eq_: Eq.Eq<R>,
R: Rng.Ring<R>,
scaleLeft: (n: number, r: R) => R,
sqrt: (r: R) => R,
conj: (r: R) => R
) => (p: Polynomial<R>) => R
Added in v1.0.0
polynomialCompose
Signature
export declare const polynomialCompose: <R>(
Eq: Eq.Eq<R>,
R: Rng.Ring<R>
) => (x: Polynomial<R>) => (y: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
polynomialDegree
Signature
export declare const polynomialDegree: <R>(p: Polynomial<R>) => number
Added in v1.0.0
projection
Signature
export declare const projection: <R extends number | Complex>(
Eq_: Eq.Eq<R>,
F: Fld.Field<R>,
scaleLeft: (n: number, r: R) => R,
conj: (r: R) => R
) => (p: Polynomial<R>, q: Polynomial<R>) => Polynomial<R>
Added in v1.0.0
Utilities
preservingZipWith
Signature
export declare const preservingZipWith: <R, S>(
f: (x: R, y: R) => S,
def: R
) => (xs: readonly R[], ys: readonly R[]) => readonly S[]
Added in v1.0.0