Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Poly<U, D, I>

Polynomial functions

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • new Poly<U, D, I>(unit: U, ...coeffs: number[]): Poly<U, D, I>

Properties

coefficients

coefficients: number[]

Optional f_

f_: undefined | IPCompiled<number, U, 1, IPFunctionCalculus<number, U, 1, Divide<U, Unit<CompleteTerms<{ time: 1 }>>>, Multiply<U, Unit<CompleteTerms<{ time: 1 }>>>>>

Readonly name

name: string

Name of this PFunction, for disambiguation and well-known functions (such as constants).

Readonly nargs

nargs: 1

Optional tex_

tex_: undefined | string

Cached LaTeX string

timestep

timestep: number = ...

The time step to be used for numerical integration. Ignored for functions with a defined analytic integral.

Readonly unit

unit: U

Accessors

f

html

  • get html(): ViewOf<this> & Element
  • Produce HTML from the LaTeX representation. Produces a new HTML element on each reference, equivalent to:

    pFun.toHtml();
    

    Returns ViewOf<this> & Element

returnType

tex

  • get tex(): string
  • Get the LaTeX representation of this function. The value is cached.

    Returns string

Methods

asConstantValue

  • asConstantValue(): null | number
  • Returns the equivalent value for Poly instances of degree 0 or 1, null otherwise.

    Returns null | number

compile

Protected compileFn

  • compileFn(): IPCompileResult1<number>

derivative

differentiate

equiv

  • equiv<T>(f: T): null | Poly<U, D, I> | T

integral

integrate

Private setName_

  • setName_(name: string): Poly<U, D, I>

simplify

toHtml

toTex

toTexWithUnits

  • toTexWithUnits(varName?: string, ctx?: StyleContext): string

Generated using TypeDoc