maps/compile#

Interfaces#

CompileContext#

Defined in: maps/compile.ts:33

What a map is compiled with: the expanded rows of the manifest’s MeasureMaps, when known.

Extended by#

Properties#

knots?#

readonly optional knots?: readonly MeasureKnots[]

Defined in: maps/compile.ts:34


MapEvaluator#

Defined in: maps/compile.ts:38

One map, compiled.

Properties#

map#

readonly map: { } | { } | { } | { } | { } | { } | { } | { } | { } | { }

Defined in: maps/compile.ts:39

missingKnots#

readonly missingKnots: boolean

Defined in: maps/compile.ts:43

Whether the map reads a MeasureMap whose expanded rows the context lacks; it then gives nothing.

outputs#

readonly outputs: ReadonlyMap<string, MapEvaluator> | null

Defined in: maps/compile.ts:45

A CombinationMap’s evaluator of each output, in the map’s key order; null for every other map.

targetUnit#

readonly targetUnit: TimeUnit | null

Defined in: maps/compile.ts:41

The unit the results lie on, null where the map names none.

Methods#

evaluate()#

evaluate(x): MapResult | undefined

Defined in: maps/compile.ts:47

The raw result at x, as timetoalign computes it; undefined where timetoalign raises.

Parameters#
x#

CoordinateValue

Returns#

MapResult | undefined

Functions#

compileMap()#

compileMap(map, context?): MapEvaluator

Defined in: maps/compile.ts:448

The evaluator of map, compiled once per map object and rows list: the same objects give the same evaluator, a map equal in value but another object is compiled anew.

Parameters#

map#

{ } | { } | { } | { } | { } | { } | { } | { } | { } | { }

context?#

CompileContext = {}

Returns#

MapEvaluator


increasing()#

increasing(values): boolean

Defined in: maps/compile.ts:108

Whether the doubles increase strictly, as timetoalign requires of anchors and breaks.

Parameters#

values#

Float64Array

Returns#

boolean


readFloat()#

readFloat(value): number

Defined in: maps/compile.ts:77

float(value) of a map parameter, read without building an exact value where none is needed.

Parameters#

value#

unknown

Returns#

number


readValue()#

readValue(value): CoordinateValue

Defined in: maps/compile.ts:64

A map parameter read by its JSON form: an integer an int, any other number a float, a pair a Fraction.

Parameters#

value#

unknown

Returns#

CoordinateValue