@graphty/graph-format 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +216 -43
- package/dist/graph-format.d.ts +1 -0
- package/dist/graph-format.d.ts.map +1 -0
- package/dist/graph-format.js +15798 -0
- package/dist/graph-format.js.map +1 -0
- package/dist/src/builder/arena.d.ts +85 -0
- package/dist/src/builder/arena.d.ts.map +1 -0
- package/dist/src/builder/arena.js +154 -0
- package/dist/src/builder/arena.js.map +1 -0
- package/dist/src/builder/compact.d.ts +515 -0
- package/dist/src/builder/compact.d.ts.map +1 -0
- package/dist/src/builder/compact.js +1553 -0
- package/dist/src/builder/compact.js.map +1 -0
- package/dist/src/builder/counting-sort.d.ts +96 -0
- package/dist/src/builder/counting-sort.d.ts.map +1 -0
- package/dist/src/builder/counting-sort.js +430 -0
- package/dist/src/builder/counting-sort.js.map +1 -0
- package/dist/src/builder/freeze.d.ts +72 -0
- package/dist/src/builder/freeze.d.ts.map +1 -0
- package/dist/src/builder/freeze.js +548 -0
- package/dist/src/builder/freeze.js.map +1 -0
- package/dist/src/builder/graph-builder.d.ts +602 -0
- package/dist/src/builder/graph-builder.d.ts.map +1 -0
- package/dist/src/builder/graph-builder.js +1940 -0
- package/dist/src/builder/graph-builder.js.map +1 -0
- package/dist/src/builder/options.d.ts +16 -0
- package/dist/src/builder/options.d.ts.map +1 -0
- package/dist/src/builder/options.js +21 -0
- package/dist/src/builder/options.js.map +1 -0
- package/dist/src/columns/bitmap.d.ts +96 -0
- package/dist/src/columns/bitmap.d.ts.map +1 -0
- package/dist/src/columns/bitmap.js +184 -0
- package/dist/src/columns/bitmap.js.map +1 -0
- package/dist/src/columns/column.d.ts +220 -0
- package/dist/src/columns/column.d.ts.map +1 -0
- package/dist/src/columns/column.js +2109 -0
- package/dist/src/columns/column.js.map +1 -0
- package/dist/src/columns/dictionary.d.ts +60 -0
- package/dist/src/columns/dictionary.d.ts.map +1 -0
- package/dist/src/columns/dictionary.js +102 -0
- package/dist/src/columns/dictionary.js.map +1 -0
- package/dist/src/columns/growable.d.ts +198 -0
- package/dist/src/columns/growable.d.ts.map +1 -0
- package/dist/src/columns/growable.js +296 -0
- package/dist/src/columns/growable.js.map +1 -0
- package/dist/src/columns/infer.d.ts +121 -0
- package/dist/src/columns/infer.d.ts.map +1 -0
- package/dist/src/columns/infer.js +268 -0
- package/dist/src/columns/infer.js.map +1 -0
- package/dist/src/columns/remap.d.ts +143 -0
- package/dist/src/columns/remap.d.ts.map +1 -0
- package/dist/src/columns/remap.js +588 -0
- package/dist/src/columns/remap.js.map +1 -0
- package/dist/src/columns/table.d.ts +184 -0
- package/dist/src/columns/table.d.ts.map +1 -0
- package/dist/src/columns/table.js +485 -0
- package/dist/src/columns/table.js.map +1 -0
- package/dist/src/constants.d.ts +34 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +79 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/errors.d.ts +76 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +32 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/ids/edge-id-index.d.ts +77 -0
- package/dist/src/ids/edge-id-index.d.ts.map +1 -0
- package/dist/src/ids/edge-id-index.js +155 -0
- package/dist/src/ids/edge-id-index.js.map +1 -0
- package/dist/src/ids/node-id-map.d.ts +280 -0
- package/dist/src/ids/node-id-map.d.ts.map +1 -0
- package/dist/src/ids/node-id-map.js +1139 -0
- package/dist/src/ids/node-id-map.js.map +1 -0
- package/dist/src/ids/string-store.d.ts +219 -0
- package/dist/src/ids/string-store.d.ts.map +1 -0
- package/dist/src/ids/string-store.js +526 -0
- package/dist/src/ids/string-store.js.map +1 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +29 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/populate/from-csr.d.ts +61 -0
- package/dist/src/populate/from-csr.d.ts.map +1 -0
- package/dist/src/populate/from-csr.js +706 -0
- package/dist/src/populate/from-csr.js.map +1 -0
- package/dist/src/populate/from-edge-arrays.d.ts +51 -0
- package/dist/src/populate/from-edge-arrays.d.ts.map +1 -0
- package/dist/src/populate/from-edge-arrays.js +217 -0
- package/dist/src/populate/from-edge-arrays.js.map +1 -0
- package/dist/src/populate/from-records.d.ts +51 -0
- package/dist/src/populate/from-records.d.ts.map +1 -0
- package/dist/src/populate/from-records.js +447 -0
- package/dist/src/populate/from-records.js.map +1 -0
- package/dist/src/snapshot/derived.d.ts +211 -0
- package/dist/src/snapshot/derived.d.ts.map +1 -0
- package/dist/src/snapshot/derived.js +1254 -0
- package/dist/src/snapshot/derived.js.map +1 -0
- package/dist/src/snapshot/graph-meta.d.ts +23 -0
- package/dist/src/snapshot/graph-meta.d.ts.map +1 -0
- package/dist/src/snapshot/graph-meta.js +159 -0
- package/dist/src/snapshot/graph-meta.js.map +1 -0
- package/dist/src/snapshot/graph-snapshot.d.ts +509 -0
- package/dist/src/snapshot/graph-snapshot.d.ts.map +1 -0
- package/dist/src/snapshot/graph-snapshot.js +1247 -0
- package/dist/src/snapshot/graph-snapshot.js.map +1 -0
- package/dist/src/snapshot/hash.d.ts +90 -0
- package/dist/src/snapshot/hash.d.ts.map +1 -0
- package/dist/src/snapshot/hash.js +228 -0
- package/dist/src/snapshot/hash.js.map +1 -0
- package/dist/src/snapshot/queries.d.ts +74 -0
- package/dist/src/snapshot/queries.d.ts.map +1 -0
- package/dist/src/snapshot/queries.js +131 -0
- package/dist/src/snapshot/queries.js.map +1 -0
- package/dist/src/snapshot/validate.d.ts +192 -0
- package/dist/src/snapshot/validate.d.ts.map +1 -0
- package/dist/src/snapshot/validate.js +990 -0
- package/dist/src/snapshot/validate.js.map +1 -0
- package/dist/src/snapshot/views.d.ts +274 -0
- package/dist/src/snapshot/views.d.ts.map +1 -0
- package/dist/src/snapshot/views.js +856 -0
- package/dist/src/snapshot/views.js.map +1 -0
- package/dist/src/types/builder.d.ts +456 -0
- package/dist/src/types/builder.d.ts.map +1 -0
- package/dist/src/types/builder.js +11 -0
- package/dist/src/types/builder.js.map +1 -0
- package/dist/src/types/columns.d.ts +615 -0
- package/dist/src/types/columns.d.ts.map +1 -0
- package/dist/src/types/columns.js +14 -0
- package/dist/src/types/columns.js.map +1 -0
- package/dist/src/types/index.d.ts +14 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +11 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/internal.d.ts +172 -0
- package/dist/src/types/internal.d.ts.map +1 -0
- package/dist/src/types/internal.js +13 -0
- package/dist/src/types/internal.js.map +1 -0
- package/dist/src/types/snapshot.d.ts +801 -0
- package/dist/src/types/snapshot.d.ts.map +1 -0
- package/dist/src/types/snapshot.js +14 -0
- package/dist/src/types/snapshot.js.map +1 -0
- package/dist/src/types/wire.d.ts +196 -0
- package/dist/src/types/wire.d.ts.map +1 -0
- package/dist/src/types/wire.js +8 -0
- package/dist/src/types/wire.js.map +1 -0
- package/dist/src/util/mask.d.ts +55 -0
- package/dist/src/util/mask.d.ts.map +1 -0
- package/dist/src/util/mask.js +71 -0
- package/dist/src/util/mask.js.map +1 -0
- package/dist/src/util/options.d.ts +22 -0
- package/dist/src/util/options.d.ts.map +1 -0
- package/dist/src/util/options.js +49 -0
- package/dist/src/util/options.js.map +1 -0
- package/dist/src/util/shared-buffers.d.ts +42 -0
- package/dist/src/util/shared-buffers.d.ts.map +1 -0
- package/dist/src/util/shared-buffers.js +52 -0
- package/dist/src/util/shared-buffers.js.map +1 -0
- package/dist/src/util/typed-array.d.ts +205 -0
- package/dist/src/util/typed-array.d.ts.map +1 -0
- package/dist/src/util/typed-array.js +289 -0
- package/dist/src/util/typed-array.js.map +1 -0
- package/dist/src/wire/bytes.d.ts +69 -0
- package/dist/src/wire/bytes.d.ts.map +1 -0
- package/dist/src/wire/bytes.js +361 -0
- package/dist/src/wire/bytes.js.map +1 -0
- package/dist/src/wire/carried-views.d.ts +111 -0
- package/dist/src/wire/carried-views.d.ts.map +1 -0
- package/dist/src/wire/carried-views.js +286 -0
- package/dist/src/wire/carried-views.js.map +1 -0
- package/dist/src/wire/from-wire.d.ts +144 -0
- package/dist/src/wire/from-wire.d.ts.map +1 -0
- package/dist/src/wire/from-wire.js +1425 -0
- package/dist/src/wire/from-wire.js.map +1 -0
- package/dist/src/wire/to-wire.d.ts +171 -0
- package/dist/src/wire/to-wire.d.ts.map +1 -0
- package/dist/src/wire/to-wire.js +652 -0
- package/dist/src/wire/to-wire.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +72 -7
- package/src/builder/arena.ts +192 -0
- package/src/builder/compact.ts +1811 -0
- package/src/builder/counting-sort.ts +506 -0
- package/src/builder/freeze.ts +689 -0
- package/src/builder/graph-builder.ts +2264 -0
- package/src/builder/options.ts +29 -0
- package/src/columns/bitmap.ts +196 -0
- package/src/columns/column.ts +2574 -0
- package/src/columns/dictionary.ts +114 -0
- package/src/columns/growable.ts +350 -0
- package/src/columns/infer.ts +285 -0
- package/src/columns/remap.ts +663 -0
- package/src/columns/table.ts +568 -0
- package/src/constants.ts +89 -0
- package/src/errors.ts +115 -0
- package/src/ids/edge-id-index.ts +179 -0
- package/src/ids/node-id-map.ts +1340 -0
- package/src/ids/string-store.ts +589 -0
- package/src/index.ts +139 -0
- package/src/lib-resizable-array-buffer.d.ts +34 -0
- package/src/populate/from-csr.ts +802 -0
- package/src/populate/from-edge-arrays.ts +257 -0
- package/src/populate/from-records.ts +536 -0
- package/src/snapshot/derived.ts +1486 -0
- package/src/snapshot/graph-meta.ts +167 -0
- package/src/snapshot/graph-snapshot.ts +1503 -0
- package/src/snapshot/hash.ts +241 -0
- package/src/snapshot/queries.ts +136 -0
- package/src/snapshot/validate.ts +1108 -0
- package/src/snapshot/views.ts +943 -0
- package/src/types/builder.ts +480 -0
- package/src/types/columns.ts +727 -0
- package/src/types/index.ts +14 -0
- package/src/types/internal.ts +195 -0
- package/src/types/snapshot.ts +886 -0
- package/src/types/wire.ts +207 -0
- package/src/util/mask.ts +89 -0
- package/src/util/options.ts +57 -0
- package/src/util/shared-buffers.ts +56 -0
- package/src/util/typed-array.ts +371 -0
- package/src/wire/bytes.ts +440 -0
- package/src/wire/carried-views.ts +327 -0
- package/src/wire/from-wire.ts +1690 -0
- package/src/wire/to-wire.ts +755 -0
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The builder's staging representation and its compaction (design sections 6.2 and 6.3 step 1).
|
|
3
|
+
*
|
|
4
|
+
* Staging is structure-of-arrays typed storage that grows by doubling: the node side (`ids`,
|
|
5
|
+
* `idToIndex`, `nodeAlive`, the incidence-list heads `firstOut` / `firstIn`), the edge side (`src`,
|
|
6
|
+
* `dst`, `weight`, `weightSet`, `edgeAlive`, the incidence-list links `nextOut` / `nextIn`), the live
|
|
7
|
+
* counts, and one `StagingColumn` per declared node / edge / extension column (a growable typed array,
|
|
8
|
+
* packed bitmap or JS array plus an optional validity bitmap and, for dict columns, an interning
|
|
9
|
+
* dictionary). No per-node or per-edge object is ever allocated.
|
|
10
|
+
*
|
|
11
|
+
* Compaction (`compactStaging`) gathers a NEW staging object through node and edge remaps assigned in
|
|
12
|
+
* index order (invariant I14): tombstoned nodes and edges disappear, `refersTo` column values are
|
|
13
|
+
* rewritten (dangling references become INVALID_INDEX with the row unset), fresh `ids` / `idToIndex`
|
|
14
|
+
* objects are built so the previous snapshot keeps the ones it shares (design section 4.2), and the
|
|
15
|
+
* incidence lists are rebuilt. The source staging is never modified, so a freeze that throws after
|
|
16
|
+
* compacting leaves the builder exactly as it was (design section 11.1); the builder commits the new
|
|
17
|
+
* staging only when the freeze succeeds.
|
|
18
|
+
*/
|
|
19
|
+
import { DictionaryBuilder } from "../columns/dictionary.js";
|
|
20
|
+
import { GrowableBitmap, GrowableTypedArray } from "../columns/growable.js";
|
|
21
|
+
import { type InferredDtype } from "../columns/infer.js";
|
|
22
|
+
import { type Column, type ColumnDeclPatch, type ColumnDomain, type ColumnMeta, type Dtype, type NodeId, type TypedArrayData, type U32 } from "../types/index.js";
|
|
23
|
+
/**
|
|
24
|
+
* The dtype an inferred (auto-declared) column starts with for a value (design section 5.1).
|
|
25
|
+
* @param value - the first set value
|
|
26
|
+
* @returns the inferred dtype; E_COLUMN_TYPE for a value no column can hold
|
|
27
|
+
*/
|
|
28
|
+
export declare function inferInitialDtype(value: unknown): InferredDtype;
|
|
29
|
+
/**
|
|
30
|
+
* The position of a dtype in the widening order of design section 5.1, for the union rule of
|
|
31
|
+
* `addGraph()` (design section 6.6): the dtypes outside the inference order map to the narrowest
|
|
32
|
+
* inferred dtype that can hold every value of theirs.
|
|
33
|
+
* @param dtype - any dtype
|
|
34
|
+
* @returns the inferred dtype the column widens to when it must hold values of `dtype`
|
|
35
|
+
*/
|
|
36
|
+
export declare function inferredEquivalent(dtype: Dtype): InferredDtype;
|
|
37
|
+
/** The widening a write caused on an inferred column. */
|
|
38
|
+
interface WideningStep {
|
|
39
|
+
/** The dtype before. */
|
|
40
|
+
readonly from: Dtype;
|
|
41
|
+
/** The dtype after. */
|
|
42
|
+
readonly to: Dtype;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One growable column of the builder (design section 6.2).
|
|
46
|
+
*
|
|
47
|
+
* A DECLARED column stores values in the storage of its dtype (a growable typed array for the numeric
|
|
48
|
+
* dtypes and dict codes, a growable bitmap for bool, a JS array for string / list / json) plus an
|
|
49
|
+
* optional validity bitmap and, for dict columns, the interning dictionary; rows are materialised
|
|
50
|
+
* lazily up to `length` and unset rows physically hold the fill (design section 5.3). It never widens
|
|
51
|
+
* and rejects values it cannot hold with E_COLUMN_TYPE at the write.
|
|
52
|
+
*
|
|
53
|
+
* An INFERRED column (auto-declared by a string column name in `setNodeValue` / `addNodeRecord`, or
|
|
54
|
+
* a declared column widened by the union rule of `addGraph`) keeps the values exactly as written in a
|
|
55
|
+
* JS array and widens its dtype monotonically per design section 5.1 as wider values arrive; the
|
|
56
|
+
* values are coerced ONCE, at freeze, to the final dtype (bool -> 1 / 0 in a number column, number or
|
|
57
|
+
* boolean -> its canonical text in a string column), exactly as `fromRecords` would.
|
|
58
|
+
*/
|
|
59
|
+
export declare class StagingColumn {
|
|
60
|
+
/** The resolved metadata; replaced when an inferred column widens. */
|
|
61
|
+
meta: ColumnMeta;
|
|
62
|
+
/** Rows materialised so far. */
|
|
63
|
+
length: number;
|
|
64
|
+
/** Declared numeric data (rows * components) or dict codes. */
|
|
65
|
+
typed: GrowableTypedArray<TypedArrayData> | null;
|
|
66
|
+
/** Declared bool data. */
|
|
67
|
+
bits: GrowableBitmap | null;
|
|
68
|
+
/** Declared string / list / json rows, or the raw values of an inferred column. */
|
|
69
|
+
values: unknown[] | null;
|
|
70
|
+
/** dict only: the interning dictionary. */
|
|
71
|
+
dictionary: DictionaryBuilder | null;
|
|
72
|
+
/** The validity bitmap; null for a non-nullable column. */
|
|
73
|
+
validity: GrowableBitmap | null;
|
|
74
|
+
private inferrer;
|
|
75
|
+
private readonly resizable;
|
|
76
|
+
/**
|
|
77
|
+
* Create an empty column.
|
|
78
|
+
* @param meta - the resolved metadata
|
|
79
|
+
* @param inferred - whether the column stages raw values and may widen
|
|
80
|
+
* @param resizable - the staging buffer kind (tests pass false); undefined = engine default
|
|
81
|
+
* @param dictionary - an existing dictionary to share (compaction); a fresh one when omitted
|
|
82
|
+
*/
|
|
83
|
+
constructor(meta: ColumnMeta, inferred: boolean, resizable?: boolean, dictionary?: DictionaryBuilder);
|
|
84
|
+
/**
|
|
85
|
+
* Whether the column stages raw values and may widen.
|
|
86
|
+
* @returns true for an inferred column
|
|
87
|
+
*/
|
|
88
|
+
get inferred(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The inferred dtype of an inferred column, or null.
|
|
91
|
+
* @returns the current inferred dtype
|
|
92
|
+
*/
|
|
93
|
+
get inferredDtype(): InferredDtype | null;
|
|
94
|
+
/**
|
|
95
|
+
* Make at least `rows` rows exist, unset (when nullable) and holding the fill.
|
|
96
|
+
* @param rows - the row count to reach
|
|
97
|
+
*/
|
|
98
|
+
ensureLength(rows: number): void;
|
|
99
|
+
/**
|
|
100
|
+
* Whether a row holds a value.
|
|
101
|
+
* @param row - the row
|
|
102
|
+
* @returns true when set (non-nullable columns: when materialised)
|
|
103
|
+
*/
|
|
104
|
+
isSet(row: number): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Set one cell (design sections 5.1 and 6.6). `undefined` unsets the row, and so does `null`
|
|
107
|
+
* except on a declared json column (JSON null imports as unset, design section 5.3). An inferred
|
|
108
|
+
* column widens when the value is wider than its dtype; the widening is returned so the builder
|
|
109
|
+
* can report it.
|
|
110
|
+
* @param row - the row; rows below it are materialised
|
|
111
|
+
* @param value - the value
|
|
112
|
+
* @returns the widening that took place, or null
|
|
113
|
+
*/
|
|
114
|
+
write(row: number, value: unknown): WideningStep | null;
|
|
115
|
+
/**
|
|
116
|
+
* Validate a value exactly as `write` would, without writing anything: the same E_COLUMN_TYPE
|
|
117
|
+
* errors for a value the column cannot hold (a non-representable number, a lone surrogate, a
|
|
118
|
+
* non-JSON object, an unset value on a non-nullable column). The record methods of the builder
|
|
119
|
+
* validate every attribute before they apply anything (design section 11.1).
|
|
120
|
+
* @param row - the row the value is meant for (error details only)
|
|
121
|
+
* @param value - the value
|
|
122
|
+
*/
|
|
123
|
+
checkValue(row: number, value: unknown): void;
|
|
124
|
+
/**
|
|
125
|
+
* Unset one cell: the validity bit is cleared and the fill is written back (design section 5.3).
|
|
126
|
+
* @param row - the row; E_COLUMN_TYPE on a non-nullable column
|
|
127
|
+
*/
|
|
128
|
+
unset(row: number): void;
|
|
129
|
+
/**
|
|
130
|
+
* The E_COLUMN_TYPE error for unsetting a row of a non-nullable column.
|
|
131
|
+
* @param row - the row
|
|
132
|
+
* @returns the error
|
|
133
|
+
*/
|
|
134
|
+
private unsetError;
|
|
135
|
+
/**
|
|
136
|
+
* The JS value of one cell as the frozen column would hold it: a number (or an array of
|
|
137
|
+
* `components` numbers), a boolean, a string, a list or a json value; undefined for an unset or
|
|
138
|
+
* unmaterialised row. An inferred column's raw value is coerced to its current dtype.
|
|
139
|
+
* @param row - the row
|
|
140
|
+
* @returns the value
|
|
141
|
+
*/
|
|
142
|
+
read(row: number): unknown;
|
|
143
|
+
/**
|
|
144
|
+
* Widen the column to a wider dtype of the design section 5.1 order. An inferred column only
|
|
145
|
+
* changes its dtype (its raw values are coerced at freeze); a declared column becomes inferred:
|
|
146
|
+
* its current values are read out and kept as raw values from then on.
|
|
147
|
+
* @param next - the dtype to widen to
|
|
148
|
+
*/
|
|
149
|
+
widenTo(next: InferredDtype): void;
|
|
150
|
+
/**
|
|
151
|
+
* A new column of the same shape holding the rows `indexMap` selects (`out[i] = this[indexMap[i]]`),
|
|
152
|
+
* or every row in order when `indexMap` is null, with `refersTo` values rewritten through
|
|
153
|
+
* `valueRemap` when given: an in-range value maps to its new index and a dangling reference
|
|
154
|
+
* becomes INVALID_INDEX with the row unset (for a list, dangling items are dropped and a row whose
|
|
155
|
+
* every item dangled becomes unset and empty). The dictionary of a dict column is shared.
|
|
156
|
+
* @param indexMap - new row -> old row, or null to keep every row
|
|
157
|
+
* @param valueRemap - the remap of the space the values reference, or null
|
|
158
|
+
* @returns the gathered column
|
|
159
|
+
*/
|
|
160
|
+
gather(indexMap: U32 | null, valueRemap: U32 | null): StagingColumn;
|
|
161
|
+
/**
|
|
162
|
+
* Leave row `i` of a gathered column unset because its reference dangled (design section 5.11).
|
|
163
|
+
* A non-nullable column gains a validity bitmap and becomes nullable (invariant I12 forbids a set
|
|
164
|
+
* row holding INVALID_INDEX; `remapColumn` flips `nullable` the same way): every earlier row is
|
|
165
|
+
* marked set except a scalar reference row still holding the INVALID_INDEX fill.
|
|
166
|
+
* @param i - the row being gathered; rows below it are already gathered
|
|
167
|
+
*/
|
|
168
|
+
private unsetDangling;
|
|
169
|
+
/**
|
|
170
|
+
* Freeze the column into `rows` rows (design section 6.3 step 10): typed data is copied out of
|
|
171
|
+
* staging into exact-length buffers (invariant I18), the validity bitmap is copied (and dropped when
|
|
172
|
+
* every row is set), a dict dictionary is copied so the snapshot's column never changes (I17), and
|
|
173
|
+
* string / list / json rows and the raw values of an inferred column go through the column factory,
|
|
174
|
+
* which coerces them to the final dtype.
|
|
175
|
+
* @param rows - the row count of the table
|
|
176
|
+
* @returns the frozen column
|
|
177
|
+
*/
|
|
178
|
+
toColumn(rows: number): Column;
|
|
179
|
+
/**
|
|
180
|
+
* Bytes of typed staging held by the column (JS arrays are not counted).
|
|
181
|
+
* @returns the byte count
|
|
182
|
+
*/
|
|
183
|
+
byteLength(): number;
|
|
184
|
+
/**
|
|
185
|
+
* Allocate the storage of the current dtype (raw values for an inferred column).
|
|
186
|
+
* @param dictionary - a dictionary to share, or undefined for a fresh seeded one
|
|
187
|
+
*/
|
|
188
|
+
private allocate;
|
|
189
|
+
/**
|
|
190
|
+
* The number written into unset numeric rows (the dict fill code for dict columns).
|
|
191
|
+
* @returns the fill
|
|
192
|
+
*/
|
|
193
|
+
private fillNumber;
|
|
194
|
+
/**
|
|
195
|
+
* The JS value stored in unset rows of a JS-array column (undefined for an inferred column).
|
|
196
|
+
* @returns the fill
|
|
197
|
+
*/
|
|
198
|
+
private fillValue;
|
|
199
|
+
/**
|
|
200
|
+
* The entry handed to the column factory for an unset row of a declared JS-array column:
|
|
201
|
+
* undefined for a nullable column, the fill for a non-nullable one (json: null, the one JSON value
|
|
202
|
+
* that means "nothing").
|
|
203
|
+
* @returns the entry
|
|
204
|
+
*/
|
|
205
|
+
private unsetEntry;
|
|
206
|
+
private writeFill;
|
|
207
|
+
/**
|
|
208
|
+
* Keep a raw value on an inferred column after checking it is storable at all (a json value must
|
|
209
|
+
* be JSON; a string must be well-formed).
|
|
210
|
+
* @param row - the row
|
|
211
|
+
* @param value - the value as written
|
|
212
|
+
*/
|
|
213
|
+
private storeRaw;
|
|
214
|
+
/**
|
|
215
|
+
* The checks of storeRaw: a string must be well-formed, an object must be JSON.
|
|
216
|
+
* @param row - the row
|
|
217
|
+
* @param value - the value as written
|
|
218
|
+
*/
|
|
219
|
+
private checkRaw;
|
|
220
|
+
/**
|
|
221
|
+
* Store a value on a declared column: validate and normalise it (E_COLUMN_TYPE when the column
|
|
222
|
+
* cannot hold it), then write the normalised form.
|
|
223
|
+
* @param row - the row
|
|
224
|
+
* @param value - the value
|
|
225
|
+
*/
|
|
226
|
+
private store;
|
|
227
|
+
/**
|
|
228
|
+
* Validate a value against a declared column's dtype and return the form `put` writes: a number
|
|
229
|
+
* or an array of `components` numbers, a boolean, a string, a copied list, or a JSON value.
|
|
230
|
+
* @param row - the row (error details only)
|
|
231
|
+
* @param value - the value
|
|
232
|
+
* @returns the normalised value
|
|
233
|
+
*/
|
|
234
|
+
private coerce;
|
|
235
|
+
/**
|
|
236
|
+
* Write a value `coerce` returned.
|
|
237
|
+
* @param row - the row
|
|
238
|
+
* @param value - the normalised value
|
|
239
|
+
*/
|
|
240
|
+
private put;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Create a staging column from a declaration patch.
|
|
244
|
+
* @param name - the column name
|
|
245
|
+
* @param domain - the table
|
|
246
|
+
* @param decl - the declaration; dtype required
|
|
247
|
+
* @param inferred - whether the column may widen
|
|
248
|
+
* @param resizable - the staging buffer kind
|
|
249
|
+
* @returns the column
|
|
250
|
+
*/
|
|
251
|
+
export declare function createStagingColumn(name: string, domain: ColumnDomain, decl: ColumnDeclPatch, inferred: boolean, resizable?: boolean): StagingColumn;
|
|
252
|
+
/** One extension table under construction (design section 5.10). */
|
|
253
|
+
export interface ExtensionStaging {
|
|
254
|
+
/** The table name. */
|
|
255
|
+
readonly name: string;
|
|
256
|
+
/** Its columns in declaration order. */
|
|
257
|
+
readonly columns: StagingColumn[];
|
|
258
|
+
/** Rows appended so far. */
|
|
259
|
+
rowCount: number;
|
|
260
|
+
}
|
|
261
|
+
/** Construction options of a Staging. */
|
|
262
|
+
interface StagingOptions {
|
|
263
|
+
/** Staging weight precision (design section 3.7). */
|
|
264
|
+
readonly weightDtype: "f32" | "f64";
|
|
265
|
+
/** Allocate the weight array up front (`weighted: true`). */
|
|
266
|
+
readonly weighted: boolean;
|
|
267
|
+
/** Node capacity hint. */
|
|
268
|
+
readonly expectedNodes: number | null;
|
|
269
|
+
/** Edge capacity hint. */
|
|
270
|
+
readonly expectedEdges: number | null;
|
|
271
|
+
/** The staging buffer kind; undefined = engine default. */
|
|
272
|
+
readonly resizable: boolean | undefined;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Whether every edge so far agreed on supplying or omitting its weight (design section 3.7): the
|
|
276
|
+
* `weightSet` bitmap is only allocated once they disagree ("mixed").
|
|
277
|
+
*/
|
|
278
|
+
type WeightMode = "none" | "explicit" | "omitted" | "mixed";
|
|
279
|
+
/**
|
|
280
|
+
* The staging of one builder (design section 6.2). Plain growable storage plus the push and link
|
|
281
|
+
* primitives; every rule (id validation, policies, error codes) lives in the builder.
|
|
282
|
+
*/
|
|
283
|
+
export declare class Staging {
|
|
284
|
+
/** The staging options. */
|
|
285
|
+
readonly options: StagingOptions;
|
|
286
|
+
/** The ids in index order, or null while every node is anonymous (id === index). */
|
|
287
|
+
ids: NodeId[] | null;
|
|
288
|
+
/** id -> index, shared by reference with frozen snapshots; null while every node is anonymous. */
|
|
289
|
+
idToIndex: Map<NodeId, number> | null;
|
|
290
|
+
/** Bit i set: node i is live. */
|
|
291
|
+
readonly nodeAlive: GrowableBitmap;
|
|
292
|
+
/** Head of the out-list of every node (an edge index), INVALID_INDEX = empty. */
|
|
293
|
+
readonly firstOut: GrowableTypedArray<U32>;
|
|
294
|
+
/** Head of the in-list of every node. */
|
|
295
|
+
readonly firstIn: GrowableTypedArray<U32>;
|
|
296
|
+
/** Declared source of every edge. */
|
|
297
|
+
readonly src: GrowableTypedArray<U32>;
|
|
298
|
+
/** Declared target of every edge. */
|
|
299
|
+
readonly dst: GrowableTypedArray<U32>;
|
|
300
|
+
/** Per-edge weights (f32 or f64 per weightDtype), or null while unweighted. */
|
|
301
|
+
weight: GrowableTypedArray<TypedArrayData> | null;
|
|
302
|
+
/** Bit e set: edge e's weight was supplied explicitly; null while every edge agrees. */
|
|
303
|
+
weightSet: GrowableBitmap | null;
|
|
304
|
+
/** Whether edges so far supplied, omitted, or disagreed about their weight. */
|
|
305
|
+
weightMode: WeightMode;
|
|
306
|
+
/** Bit e set: edge e is live. */
|
|
307
|
+
readonly edgeAlive: GrowableBitmap;
|
|
308
|
+
/** Next edge in the out-list of the source of every edge. */
|
|
309
|
+
readonly nextOut: GrowableTypedArray<U32>;
|
|
310
|
+
/** Next edge in the in-list of the target of every edge. */
|
|
311
|
+
readonly nextIn: GrowableTypedArray<U32>;
|
|
312
|
+
/** Live node count. */
|
|
313
|
+
liveNodeCount: number;
|
|
314
|
+
/** Live edge count. */
|
|
315
|
+
liveEdgeCount: number;
|
|
316
|
+
/** Live self-loop count. */
|
|
317
|
+
selfLoopCount: number;
|
|
318
|
+
/** Node columns in handle order. */
|
|
319
|
+
nodeColumns: StagingColumn[];
|
|
320
|
+
/** Edge columns in handle order. */
|
|
321
|
+
edgeColumns: StagingColumn[];
|
|
322
|
+
/** Extension tables in handle order. */
|
|
323
|
+
extensions: ExtensionStaging[];
|
|
324
|
+
/**
|
|
325
|
+
* Create empty staging.
|
|
326
|
+
* @param options - precision, capacity hints and buffer kind
|
|
327
|
+
*/
|
|
328
|
+
constructor(options: StagingOptions);
|
|
329
|
+
/**
|
|
330
|
+
* The next node index to be assigned.
|
|
331
|
+
* @returns the node bound
|
|
332
|
+
*/
|
|
333
|
+
get nodeBound(): number;
|
|
334
|
+
/**
|
|
335
|
+
* The next edge index to be assigned.
|
|
336
|
+
* @returns the edge bound
|
|
337
|
+
*/
|
|
338
|
+
get edgeBound(): number;
|
|
339
|
+
/**
|
|
340
|
+
* Whether tombstoned nodes or edges exist.
|
|
341
|
+
* @returns true when compaction is needed
|
|
342
|
+
*/
|
|
343
|
+
get hasTombstones(): boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Grow capacity ahead of a bulk push.
|
|
346
|
+
* @param nodes - the node count to fit
|
|
347
|
+
* @param edges - the edge count to fit
|
|
348
|
+
*/
|
|
349
|
+
reserve(nodes: number, edges: number): void;
|
|
350
|
+
/**
|
|
351
|
+
* Materialise `ids` and `idToIndex` from the anonymous prefix (every node so far has id === index).
|
|
352
|
+
*/
|
|
353
|
+
materialiseIds(): void;
|
|
354
|
+
/**
|
|
355
|
+
* Append a live node; the id is recorded only when the id structures exist.
|
|
356
|
+
* @param id - the id, or null for an anonymous node (id === index)
|
|
357
|
+
* @returns the new index
|
|
358
|
+
*/
|
|
359
|
+
pushNode(id: NodeId | null): number;
|
|
360
|
+
/**
|
|
361
|
+
* The weight array, allocated on first use and back-filled with 1 for existing edges.
|
|
362
|
+
* @returns the growable weight array
|
|
363
|
+
*/
|
|
364
|
+
ensureWeights(): GrowableTypedArray<TypedArrayData>;
|
|
365
|
+
/**
|
|
366
|
+
* Record whether an edge's weight was explicit (design section 3.7): the `weightSet` bitmap is
|
|
367
|
+
* allocated on the first edge that disagrees with every earlier one.
|
|
368
|
+
* @param edge - the edge index (=== edgeBound - 1 when appending)
|
|
369
|
+
* @param explicit - whether the weight was supplied
|
|
370
|
+
*/
|
|
371
|
+
trackWeight(edge: number, explicit: boolean): void;
|
|
372
|
+
/**
|
|
373
|
+
* Whether an edge's weight was supplied explicitly (design section 3.7).
|
|
374
|
+
* @param e - the edge index
|
|
375
|
+
* @returns true when explicit
|
|
376
|
+
*/
|
|
377
|
+
weightExplicit(e: number): boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Append a live edge and link it into both incidence lists. The caller has validated the
|
|
380
|
+
* endpoints and the weight.
|
|
381
|
+
* @param u - source index
|
|
382
|
+
* @param v - target index
|
|
383
|
+
* @param weight - the weight, or undefined when omitted (stored as 1 when the array exists)
|
|
384
|
+
* @returns the new edge index
|
|
385
|
+
*/
|
|
386
|
+
pushEdge(u: number, v: number, weight: number | undefined): number;
|
|
387
|
+
/**
|
|
388
|
+
* Append `src.length` live edges at once (the bulk `addEdges` path): the same storage, weight
|
|
389
|
+
* tracking and incidence-list linking as one pushEdge per edge in order, done as typed-array
|
|
390
|
+
* passes. The caller has validated the endpoints and the weights.
|
|
391
|
+
* @param src - source indices
|
|
392
|
+
* @param dst - target indices, as many as `src`
|
|
393
|
+
* @param weights - the explicit weight of every edge, or null when every weight is omitted
|
|
394
|
+
* @returns the first new edge index
|
|
395
|
+
*/
|
|
396
|
+
pushEdges(src: U32, dst: U32, weights: TypedArrayData | null): number;
|
|
397
|
+
/**
|
|
398
|
+
* trackWeight for a batch of `count` edges from `first` that all supplied or all omitted their
|
|
399
|
+
* weight: the same mode transitions and bitmap contents as `count` calls in order.
|
|
400
|
+
* @param first - the first edge of the batch
|
|
401
|
+
* @param count - the batch size, at least 1
|
|
402
|
+
* @param explicit - whether the batch supplied its weights
|
|
403
|
+
*/
|
|
404
|
+
private trackWeights;
|
|
405
|
+
/**
|
|
406
|
+
* Tombstone a live edge (O(1)).
|
|
407
|
+
* @param e - a live edge index
|
|
408
|
+
*/
|
|
409
|
+
killEdge(e: number): void;
|
|
410
|
+
/**
|
|
411
|
+
* Live edges leaving a node, walked from the out-list (O(degree)).
|
|
412
|
+
* @param u - the node index
|
|
413
|
+
* @returns the live edge indices in ascending order
|
|
414
|
+
*/
|
|
415
|
+
outEdges(u: number): U32;
|
|
416
|
+
/**
|
|
417
|
+
* Live edges entering a node, walked from the in-list (O(degree)).
|
|
418
|
+
* @param v - the node index
|
|
419
|
+
* @returns the live edge indices in ascending order
|
|
420
|
+
*/
|
|
421
|
+
inEdges(v: number): U32;
|
|
422
|
+
/**
|
|
423
|
+
* Live edges incident to a node in either orientation (the undirected outEdgesOf / inEdgesOf,
|
|
424
|
+
* design section 6.6 and invariant I7): both lists walked, a self-loop listed once (O(degree)).
|
|
425
|
+
* @param u - the node index
|
|
426
|
+
* @returns the live edge indices in ascending order
|
|
427
|
+
*/
|
|
428
|
+
incidentEdges(u: number): U32;
|
|
429
|
+
/**
|
|
430
|
+
* Bytes of typed staging held (capacity, not length), for `byteLength()`.
|
|
431
|
+
* @returns the byte count
|
|
432
|
+
*/
|
|
433
|
+
byteLength(): number;
|
|
434
|
+
private allocateWeights;
|
|
435
|
+
/**
|
|
436
|
+
* Allocate the weightSet bitmap over `edge + 1` bits: every earlier edge gets `earlier`, `edge`
|
|
437
|
+
* itself the opposite.
|
|
438
|
+
* @param earlier - the value of every edge before `edge`
|
|
439
|
+
* @param edge - the first disagreeing edge
|
|
440
|
+
* @returns the new bitmap
|
|
441
|
+
*/
|
|
442
|
+
private allocateWeightSet;
|
|
443
|
+
}
|
|
444
|
+
/** The maps of the two index spaces a `refersTo` column's values may live in (old -> new, or source -> builder). */
|
|
445
|
+
export interface IndexMaps {
|
|
446
|
+
/** Node index map. */
|
|
447
|
+
readonly node: U32;
|
|
448
|
+
/** Edge index map. */
|
|
449
|
+
readonly edge: U32;
|
|
450
|
+
}
|
|
451
|
+
/** An old -> new index remap with its inverse and the new count. */
|
|
452
|
+
export interface IndexRemap {
|
|
453
|
+
/** old index -> new index or INVALID_INDEX. */
|
|
454
|
+
readonly remap: U32;
|
|
455
|
+
/** new index -> old index. */
|
|
456
|
+
readonly origin: U32;
|
|
457
|
+
/** The new count. */
|
|
458
|
+
readonly count: number;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The remap that drops every index whose `keep(i)` is false, assigning new indices in index order
|
|
462
|
+
* (invariant I14).
|
|
463
|
+
* @param bound - the old index space size
|
|
464
|
+
* @param keep - whether an old index survives
|
|
465
|
+
* @returns the remap, its inverse and the new count
|
|
466
|
+
*/
|
|
467
|
+
export declare function remapDropping(bound: number, keep: (i: number) => boolean): IndexRemap;
|
|
468
|
+
/**
|
|
469
|
+
* The remap that keeps exactly the indices whose bit is set in `keep` (a bitmap over `bound` bits),
|
|
470
|
+
* assigning new indices in index order (invariant I14): `remapDropping` over the builder's alive
|
|
471
|
+
* bitmaps without a call per index.
|
|
472
|
+
* @param bound - the old index space size
|
|
473
|
+
* @param keep - a bitmap of at least `bound` bits; bit i set = old index i survives
|
|
474
|
+
* @returns the remap, its inverse and the new count
|
|
475
|
+
*/
|
|
476
|
+
export declare function remapKeepingBits(bound: number, keep: U32): IndexRemap;
|
|
477
|
+
/**
|
|
478
|
+
* The remap that keeps exactly the survivors of a merge walk (the indices with `survivorOf[e] === e`),
|
|
479
|
+
* assigning new indices in index order (invariant I14): `remapDropping` for design section 6.5's
|
|
480
|
+
* step-7 repeat without a call per edge.
|
|
481
|
+
* @param survivorOf - old edge -> its survivor (itself for a survivor)
|
|
482
|
+
* @returns the remap, its inverse and the new count
|
|
483
|
+
*/
|
|
484
|
+
export declare function remapSurvivors(survivorOf: U32): IndexRemap;
|
|
485
|
+
/** What a compaction gathers: the node and edge remaps plus optional merged-weight overrides. */
|
|
486
|
+
interface CompactionPlan {
|
|
487
|
+
/** The node remap (old -> new). */
|
|
488
|
+
readonly nodes: IndexRemap;
|
|
489
|
+
/** The edge remap (old -> new) of the ROWS; merged edges map to INVALID_INDEX here (their survivor carries them). */
|
|
490
|
+
readonly edges: IndexRemap;
|
|
491
|
+
/**
|
|
492
|
+
* The remap `refersTo: "edge"` VALUES are rewritten through when it differs from the row remap: a
|
|
493
|
+
* merged edge maps to its survivor's new index (design sections 5.11 and 7.3), never to
|
|
494
|
+
* INVALID_INDEX. Null when the row remap applies to values too.
|
|
495
|
+
*/
|
|
496
|
+
readonly edgeValues: U32 | null;
|
|
497
|
+
/** Per NEW edge: the reduced weight to store where `mergedWeightStored` is set; null when no merge happened. */
|
|
498
|
+
readonly mergedWeights: Float64Array | null;
|
|
499
|
+
/** Per NEW edge: bit set when `mergedWeights` holds a value to store; null when no merge happened. */
|
|
500
|
+
readonly mergedWeightStored: U32 | null;
|
|
501
|
+
/** Per NEW edge: bit set when the merged group's weight is explicit after the merge; null when no merge happened. */
|
|
502
|
+
readonly mergedWeightSet: U32 | null;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Gather a new staging through a compaction plan (design section 6.3 step 1). The source is left
|
|
506
|
+
* untouched; the result has no tombstones, fresh `ids` / `idToIndex` objects (or none when every node
|
|
507
|
+
* is anonymous), rebuilt incidence lists, gathered columns with `refersTo` values rewritten, and
|
|
508
|
+
* extension tables with their `refersTo` values rewritten.
|
|
509
|
+
* @param source - the staging to compact
|
|
510
|
+
* @param plan - the remaps and merge overrides
|
|
511
|
+
* @returns the compacted staging
|
|
512
|
+
*/
|
|
513
|
+
export declare function compactStaging(source: Staging, plan: CompactionPlan): Staging;
|
|
514
|
+
export {};
|
|
515
|
+
//# sourceMappingURL=compact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../src/builder/compact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,OAAO,EAA0B,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAA8B,KAAK,aAAa,EAAmB,MAAM,qBAAqB,CAAC;AAItG,OAAO,EACH,KAAK,MAAM,EACX,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,cAAc,EACnB,KAAK,GAAG,EACX,MAAM,mBAAmB,CAAC;AAyB3B;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAQ/D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAsB9D;AA0DD,yDAAyD;AACzD,UAAU,YAAY;IAClB,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,uBAAu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