matches/anchors#

Interfaces#

AnchorIndex#

Defined in: matches/anchors.ts:89

The anchor index of a MatchClaim table under a belief mask (anchorIndexOf): its coordinates, alignment anchors, neighbours, potential MatchStamps and matched spans.

Properties#

anchors#

readonly anchors: Anchors

Defined in: matches/anchors.ts:95

columns#

readonly columns: MatchClaimColumns

Defined in: matches/anchors.ts:90

coordinates#

readonly coordinates: Coordinates

Defined in: matches/anchors.ts:94

mask#

readonly mask: Uint8Array<ArrayBufferLike> | null

Defined in: matches/anchors.ts:91

matchStamps#

readonly matchStamps: PotentialMatchStamps

Defined in: matches/anchors.ts:97

neighbours#

readonly neighbours: Neighbours

Defined in: matches/anchors.ts:96

spans#

readonly spans: MatchedSpans

Defined in: matches/anchors.ts:98

timelineNumbers#

readonly timelineNumbers: ReadonlyMap<string, number>

Defined in: matches/anchors.ts:93

Each timeline’s ID to its number in columns.timelines.


Anchors#

Defined in: matches/anchors.ts:46

Unique AlignmentAnchors: coordinate pairs, lower number first, ordered by (low, high).

Properties#

claimOffsets#

readonly claimOffsets: Uint32Array

Defined in: matches/anchors.ts:51

The rows stating anchor a are claimRows[claimOffsets[a] … claimOffsets[a + 1]], ascending.

claimRows#

readonly claimRows: Uint32Array

Defined in: matches/anchors.ts:52

count#

readonly count: number

Defined in: matches/anchors.ts:47

endOf#

readonly endOf: Int32Array

Defined in: matches/anchors.ts:56

Per row its end anchor, −1 when it is no interval claim passing the mask.

high#

readonly high: Uint32Array

Defined in: matches/anchors.ts:49

low#

readonly low: Uint32Array

Defined in: matches/anchors.ts:48

startOf#

readonly startOf: Int32Array

Defined in: matches/anchors.ts:54

Per row its start anchor, −1 when it gives none (NOMATCH, conceptual, masked).


Coordinates#

Defined in: matches/anchors.ts:31

One entry per unique (timeline, exact value), ordered by timeline, position, exact value.

Properties#

byTimeline#

readonly byTimeline: Uint32Array

Defined in: matches/anchors.ts:42

The order: the coordinates of timeline t are byTimeline[t] up to byTimeline[t + 1], ascending by position.

count#

readonly count: number

Defined in: matches/anchors.ts:32

position#

readonly position: Float64Array

Defined in: matches/anchors.ts:35

The sort and hit-test key; never an equality on an exact axis.

source#

readonly source: Uint32Array

Defined in: matches/anchors.ts:37

One value stating the coordinate, as row * 4 + column.

timeline#

readonly timeline: Uint32Array

Defined in: matches/anchors.ts:33


MatchedSpans#

Defined in: matches/anchors.ts:77

Per interval claim passing the mask (in row order) its start and end anchor.

Properties#

count#

readonly count: number

Defined in: matches/anchors.ts:78

end#

readonly end: Uint32Array

Defined in: matches/anchors.ts:81

rows#

readonly rows: Uint32Array

Defined in: matches/anchors.ts:79

start#

readonly start: Uint32Array

Defined in: matches/anchors.ts:80


Neighbours#

Defined in: matches/anchors.ts:60

Per coordinate the coordinates it is joined to, ascending, with the anchor joining each.

Properties#

anchors#

readonly anchors: Uint32Array

Defined in: matches/anchors.ts:63

coordinates#

readonly coordinates: Uint32Array

Defined in: matches/anchors.ts:62

offsets#

readonly offsets: Uint32Array

Defined in: matches/anchors.ts:61


PotentialMatchStamps#

Defined in: matches/anchors.ts:67

The potential MatchStamps, numbered by their first coordinate.

Properties#

count#

readonly count: number

Defined in: matches/anchors.ts:68

members#

readonly members: Uint32Array

Defined in: matches/anchors.ts:73

of#

readonly of: Uint32Array

Defined in: matches/anchors.ts:70

Per coordinate its MatchStamp.

offsets#

readonly offsets: Uint32Array

Defined in: matches/anchors.ts:72

The coordinates of MatchStamp m are members[offsets[m] … offsets[m + 1]], ascending.


Segments#

Defined in: matches/anchors.ts:597

The anchors between two timelines in the first one’s order, and per gap between neighbouring anchors (1 or 0) whether a matched span between the two timelines covers it.

Properties#

anchors#

readonly anchors: Uint32Array

Defined in: matches/anchors.ts:598

covered#

readonly covered: Uint8Array

Defined in: matches/anchors.ts:599

Functions#

anchorIndexOf()#

anchorIndexOf(columns, mask?): AnchorIndex

Defined in: matches/anchors.ts:111

Build the anchor index of columns under mask (1: the row passes the belief filter; null: every row passes).

Parameters#

columns#

MatchClaimColumns

mask?#

Uint8Array<ArrayBufferLike> | null = null

Returns#

AnchorIndex

Throws#

for columns the encoding refuses (checkColumns, on the first build from them) or a mask of another length.


anchorOf()#

anchorOf(index, left, right): number

Defined in: matches/anchors.ts:537

The anchor joining two coordinates, or −1.

Parameters#

index#

AnchorIndex

left#

number

Returns#

number


claimRowsOf()#

claimRowsOf(index, anchors): Uint32Array

Defined in: matches/anchors.ts:572

The rows of the MatchClaims stating any of anchors, ascending, each once.

Parameters#

index#

AnchorIndex

anchors#

ArrayLike<number>

Returns#

Uint32Array


coordinateNear()#

coordinateNear(index, timeline, position, tolerance): number

Defined in: matches/anchors.ts:484

The coordinate of timeline (a number) nearest to position within tolerance (both in the timeline’s units, as doubles), or −1; of two equally near the lower numbered.

Parameters#

index#

AnchorIndex

timeline#

number

position#

number

tolerance#

number

Returns#

number


coordinateOf()#

coordinateOf(index, timeline, value): number

Defined in: matches/anchors.ts:462

The coordinate of timeline (an ID) holding exactly value, or −1. A float axis takes a number, an exact axis a bigint or a Rational; another kind of value lies on no coordinate.

Parameters#

index#

AnchorIndex

timeline#

string

value#

CoordinateValue

Returns#

number


coordinatesWithin()#

coordinatesWithin(index, timeline, from, to): readonly [number, number]

Defined in: matches/anchors.ts:517

The coordinates of timeline (a number) with positions from from to to, both included: the range [first, end) of coordinate numbers.

Parameters#

index#

AnchorIndex

timeline#

number

from#

number

to#

number

Returns#

readonly [number, number]


coordinateValue()#

coordinateValue(index, coordinate): CoordinateValue

Defined in: matches/anchors.ts:440

A coordinate’s exact value, in its timeline’s number type.

Parameters#

index#

AnchorIndex

coordinate#

number

Returns#

CoordinateValue


matchStampAnchors()#

matchStampAnchors(index, matchStamp): Uint32Array

Defined in: matches/anchors.ts:560

The anchors of a potential MatchStamp, ascending.

Parameters#

index#

AnchorIndex

matchStamp#

number

Returns#

Uint32Array


matchStampMembers()#

matchStampMembers(index, matchStamp): Uint32Array

Defined in: matches/anchors.ts:554

The coordinates of a potential MatchStamp, ascending.

Parameters#

index#

AnchorIndex

matchStamp#

number

Returns#

Uint32Array


segmentsOf()#

segmentsOf(index, first, second): Segments

Defined in: matches/anchors.ts:608

The segments of two timelines (numbers), built on demand in one sweep over the first timeline’s coordinates.

Parameters#

index#

AnchorIndex

first#

number

second#

number

Returns#

Segments

Throws#

when both are one timeline.