Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Piecewise<R, C, D, I, N>

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

Optional f_

f_: IPCompiled<R, C, N>

Private functions

functions: IPFunctionCalculus<R, C, 0 | 1, D, I>[] = []

Readonly name

name: string

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

Readonly nargs

nargs: N

Private start_times

start_times: number[] = []

Optional tex_

tex_: undefined | string

Cached LaTeX string

timestep

timestep: number = TIMESTEP

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

Private Readonly type

type: TYPE

Readonly unit

unit: C

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

  • get returnType(): TYPE

tex

  • get tex(): string

Methods

add

  • Add a piece of the function starting at t and continuing up to the next time.

    Parameters

    Returns this

at

  • Add a series of segments, e.g. pw.at(t0, f0, t1, f1, t2, f2, ...);

    Parameters

    • Rest ...pairs: [number, number | IPFunctionCalculus<R, C, 0 | 1, D, I>][]

      alternating time and value pairs.

    Returns this

compile

Protected compileFn

derivative

differentiate

equiv

  • equiv<T>(f: T): null | this | T

initial

integral

integrate

Private setName_

  • setName_(name: string): this

simplify

toHtml

  • Produce HTML from the LaTeX representation. Produces a new HTML element on each call

    Parameters

    • Default value varName: Variable = "t"
    • Default value block: boolean = false
    • Default value ctx: StyleContext = DEFAULT_STYLE.context

    Returns ViewOf<this> & Element

toTex

toTexWithUnits

Generated using TypeDoc