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#
readonlyend:ValueColumn
Defined in: matches/columns.ts:39
start#
readonlystart:ValueColumn
Defined in: matches/columns.ts:38
timeline#
readonlytimeline: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#
readonlyid:string
Defined in: matches/columns.ts:23
numberType#
readonlynumberType:NumberType
Defined in: matches/columns.ts:24
ClaimValues#
Defined in: matches/columns.ts:80
One MatchClaim given by values, for matchClaimColumns.
Properties#
end?#
readonlyoptionalend?: readonly [CoordinateValue,CoordinateValue]
Defined in: matches/columns.ts:87
The end values of A and B, for an interval claim.
id#
readonlyid:string
Defined in: matches/columns.ts:81
start?#
readonlyoptionalstart?: readonly [CoordinateValue,CoordinateValue]
Defined in: matches/columns.ts:85
The start values of A and B; absent for a MatchClaim without anchors.
timelines#
readonlytimelines: 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#
readonlya:ClaimSide
Defined in: matches/columns.ts:55
b#
readonlyb:ClaimSide
Defined in: matches/columns.ts:56
claimIds#
readonlyclaimIds: readonlystring[]
Defined in: matches/columns.ts:53
endPresent#
readonlyendPresent:Uint8Array
Defined in: matches/columns.ts:58
rows#
readonlyrows:number
Defined in: matches/columns.ts:52
startPresent#
readonlystartPresent:Uint8Array
Defined in: matches/columns.ts:57
timelines#
readonlytimelines: readonlyClaimTimeline[]
Defined in: matches/columns.ts:54
ValueCell#
Defined in: matches/columns.ts:62
One value in the three columns.
Properties#
denominator#
readonlydenominator:bigint
Defined in: matches/columns.ts:65
numerator#
readonlynumerator:bigint
Defined in: matches/columns.ts:64
position#
readonlyposition: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#
readonlydenominator:BigInt64Array
Defined in: matches/columns.ts:31
numerator#
readonlynumerator:BigInt64Array
Defined in: matches/columns.ts:30
position#
readonlyposition:Float64Array
Defined in: matches/columns.ts:29
Variables#
HIGH_WORD#
constHIGH_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#
constLOW_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#
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#
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#
source#
number
Returns#
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#
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#
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#
source#
number
Returns#
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#
Returns#
valueColumns()#
valueColumns(
columns): readonlyValueColumn[]
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#
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