matches/columns#

Interfaces#

ClaimSide#

Defined in: matches/columns.ts:35

One side of every MatchClaim: its timeline number and its start and end values.

Properties#

end#

readonly end: ValueColumn

Defined in: matches/columns.ts:39

start#

readonly start: ValueColumn

Defined in: matches/columns.ts:38

timeline#

readonly timeline: Uint32Array

Defined in: matches/columns.ts:37

Per row an index into MatchClaimColumns.timelines.


ClaimTimeline#

Defined in: matches/columns.ts:22

A timeline the table holds values for: its ID and the number type of its axis.

Properties#

id#

readonly id: string

Defined in: matches/columns.ts:23

numberType#

readonly numberType: NumberType

Defined in: matches/columns.ts:24


ClaimValues#

Defined in: matches/columns.ts:80

One MatchClaim given by values, for matchClaimColumns.

Properties#

end?#

readonly optional end?: readonly [CoordinateValue, CoordinateValue]

Defined in: matches/columns.ts:87

The end values of A and B, for an interval claim.

id#

readonly id: string

Defined in: matches/columns.ts:81

start?#

readonly optional start?: readonly [CoordinateValue, CoordinateValue]

Defined in: matches/columns.ts:85

The start values of A and B; absent for a MatchClaim without anchors.

timelines#

readonly timelines: readonly [number, number]

Defined in: matches/columns.ts:83

Timeline numbers of sides A and B.


MatchClaimColumns#

Defined in: matches/columns.ts:51

The MatchClaim table’s columns: rows rows, a claim ID per row, the sides A and B, and per row whether it has a start anchor and an end anchor (1 or 0). A NOMATCH or conceptual MatchClaim has neither; a synchronous one has a start anchor whether its sides name events or are CHUNK (the anchor states a position on a timeline that holds no event for it); a row with an end anchor has a start anchor. A value column’s cells of a row without that anchor are not read, and no event ID is.

Properties#

a#

readonly a: ClaimSide

Defined in: matches/columns.ts:55

b#

readonly b: ClaimSide

Defined in: matches/columns.ts:56

claimIds#

readonly claimIds: readonly string[]

Defined in: matches/columns.ts:53

endPresent#

readonly endPresent: Uint8Array

Defined in: matches/columns.ts:58

rows#

readonly rows: number

Defined in: matches/columns.ts:52

startPresent#

readonly startPresent: Uint8Array

Defined in: matches/columns.ts:57

timelines#

readonly timelines: readonly ClaimTimeline[]

Defined in: matches/columns.ts:54


ValueCell#

Defined in: matches/columns.ts:62

One value in the three columns.

Properties#

denominator#

readonly denominator: bigint

Defined in: matches/columns.ts:65

numerator#

readonly numerator: bigint

Defined in: matches/columns.ts:64

position#

readonly position: number

Defined in: matches/columns.ts:63


ValueColumn#

Defined in: matches/columns.ts:28

One value column: per row a position and an exact numerator and denominator.

Properties#

denominator#

readonly denominator: BigInt64Array

Defined in: matches/columns.ts:31

numerator#

readonly numerator: BigInt64Array

Defined in: matches/columns.ts:30

position#

readonly position: Float64Array

Defined in: matches/columns.ts:29

Variables#

HIGH_WORD#

const HIGH_WORD: 0 | 1

Defined in: matches/columns.ts:219

The index of an int64’s high 32-bit word in an Int32Array view of it.


LOW_WORD#

const LOW_WORD: 0 | 1

Defined in: matches/columns.ts:217

The index of an int64’s low 32-bit word in an Int32Array view of it.

Functions#

checkColumns()#

checkColumns(columns): void

Defined in: matches/columns.ts:302

Check the columns against the encoding, once per table: an index built from columns checks them on its first build, so a rebuild under another mask does not; columns are never changed after they arrive.

Parameters#

columns#

MatchClaimColumns

Returns#

void

Throws#

for a column whose length is not the row count, a claim ID given to two rows, a timeline number beyond the timelines, an end anchor without a start anchor, a position that is not finite, a denominator other than 1 on an int axis, a denominator below 1 or a fraction not in lowest terms on a fraction axis, or an exact value whose position is not the double nearest to it.


claimRowOf()#

claimRowOf(columns): ReadonlyMap<string, number>

Defined in: matches/columns.ts:211

Each claim ID of the columns to its row, built once per columns (by checkColumns, or on the first call).

Parameters#

columns#

MatchClaimColumns

Returns#

ReadonlyMap<string, number>


exactAt()#

exactAt(columns, source): Rational

Defined in: matches/columns.ts:165

The exact value row * 4 + column holds on an int or fraction axis.

Parameters#

columns#

MatchClaimColumns

source#

number

Returns#

Rational


matchClaimColumns()#

matchClaimColumns(timelines, claims): MatchClaimColumns

Defined in: matches/columns.ts:106

The columns of MatchClaims given by values: the encoding, written out once.

Parameters#

timelines#

readonly ClaimTimeline[]

claims#

readonly ClaimValues[]

Returns#

MatchClaimColumns


timelineAt()#

timelineAt(columns, row, column): number

Defined in: matches/columns.ts:155

The timeline number of a value column’s side in a row.

Parameters#

columns#

MatchClaimColumns

row#

number

column#

number

Returns#

number


valueAt()#

valueAt(columns, source): CoordinateValue

Defined in: matches/columns.ts:170

The value row * 4 + column holds, in its timeline’s number type.

Parameters#

columns#

MatchClaimColumns

source#

number

Returns#

CoordinateValue


valueCell()#

valueCell(value): ValueCell

Defined in: matches/columns.ts:69

A coordinate value as its three cells: a float as itself, an exact value as its lowest terms.

Parameters#

value#

CoordinateValue

Returns#

ValueCell


valueColumns()#

valueColumns(columns): readonly ValueColumn[]

Defined in: matches/columns.ts:150

The four value columns in their fixed order: 0 side A’s start, 1 side B’s start, 2 side A’s end, 3 side B’s end. A value is addressed as row * 4 + column.

Parameters#

columns#

MatchClaimColumns

Returns#

readonly ValueColumn[]


wordsOf()#

wordsOf(values): Int32Array

Defined in: matches/columns.ts:222

The 32-bit words of an int64 column, viewed without copying.

Parameters#

values#

BigInt64Array

Returns#

Int32Array