Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Piecewise<R, C, D, I>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Optional f_

f_: undefined | IPCompiled<R, C, 1, R extends number ? IPFunctionCalculus<number, C, 1, Divide<C, Unit<CompleteTerms<{ time: 1 }>>>, Multiply<C, Unit<CompleteTerms<{ time: 1 }>>>> : R extends Rotation<Unit<CompleteTerms<{ angle: 1 }>>> ? IPFunctionCalculus<Rotation<Unit<CompleteTerms<{ angle: 1 }>>>, C, 1, Divide<C, Unit<CompleteTerms<{ time: 1 }>>>, Multiply<C, Unit<CompleteTerms<{ time: 1 }>>>> : R extends Vector<Unit<CompleteTerms<{ length: 1 }>>, Unit<DivideTerms<CompleteTerms<{ length: 1 }>, CompleteTerms<{ time: 1 }>>>, Unit<MultiplyTerms<CompleteTerms<{ length: 1 }>, CompleteTerms<{ time: 1 }>>>> ? IPFunctionCalculus<Vector<Unit<CompleteTerms<{ length: 1 }>>, Unit<DivideTerms<CompleteTerms<{ length: 1 }>, CompleteTerms<{ time: 1 }>>>, Unit<MultiplyTerms<CompleteTerms<{ length: 1 }>, CompleteTerms<{ time: 1 }>>>>, C, 1, Divide<C, Unit<CompleteTerms<{ time: 1 }>>>, Multiply<C, Unit<CompleteTerms<{ time: 1 }>>>> : R extends Point ? IPFunctionBase<Point, C, 1> : R extends Orientation ? IPFunctionBase<Orientation, C, 1> : never>

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: 1

Private start_times

start_times: number[] = ...

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.

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
  • Get the LaTeX representation of this function. The value is cached.

    Returns string

Methods

add

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 Piecewise<R, C, D, I>

compile

Protected compileFn

  • compileFn(): IPCompileResult1<R>

derivative

differentiate

equiv

  • equiv<T>(f: T): null | Piecewise<R, C, D, I> | T

initial

integral

integrate

Private setName_

  • setName_(name: string): Piecewise<R, C, D, I>

simplify

toHtml

toTex

toTexWithUnits

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

Generated using TypeDoc