@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.
Files changed (224) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -43
  3. package/dist/graph-format.d.ts +1 -0
  4. package/dist/graph-format.d.ts.map +1 -0
  5. package/dist/graph-format.js +15798 -0
  6. package/dist/graph-format.js.map +1 -0
  7. package/dist/src/builder/arena.d.ts +85 -0
  8. package/dist/src/builder/arena.d.ts.map +1 -0
  9. package/dist/src/builder/arena.js +154 -0
  10. package/dist/src/builder/arena.js.map +1 -0
  11. package/dist/src/builder/compact.d.ts +515 -0
  12. package/dist/src/builder/compact.d.ts.map +1 -0
  13. package/dist/src/builder/compact.js +1553 -0
  14. package/dist/src/builder/compact.js.map +1 -0
  15. package/dist/src/builder/counting-sort.d.ts +96 -0
  16. package/dist/src/builder/counting-sort.d.ts.map +1 -0
  17. package/dist/src/builder/counting-sort.js +430 -0
  18. package/dist/src/builder/counting-sort.js.map +1 -0
  19. package/dist/src/builder/freeze.d.ts +72 -0
  20. package/dist/src/builder/freeze.d.ts.map +1 -0
  21. package/dist/src/builder/freeze.js +548 -0
  22. package/dist/src/builder/freeze.js.map +1 -0
  23. package/dist/src/builder/graph-builder.d.ts +602 -0
  24. package/dist/src/builder/graph-builder.d.ts.map +1 -0
  25. package/dist/src/builder/graph-builder.js +1940 -0
  26. package/dist/src/builder/graph-builder.js.map +1 -0
  27. package/dist/src/builder/options.d.ts +16 -0
  28. package/dist/src/builder/options.d.ts.map +1 -0
  29. package/dist/src/builder/options.js +21 -0
  30. package/dist/src/builder/options.js.map +1 -0
  31. package/dist/src/columns/bitmap.d.ts +96 -0
  32. package/dist/src/columns/bitmap.d.ts.map +1 -0
  33. package/dist/src/columns/bitmap.js +184 -0
  34. package/dist/src/columns/bitmap.js.map +1 -0
  35. package/dist/src/columns/column.d.ts +220 -0
  36. package/dist/src/columns/column.d.ts.map +1 -0
  37. package/dist/src/columns/column.js +2109 -0
  38. package/dist/src/columns/column.js.map +1 -0
  39. package/dist/src/columns/dictionary.d.ts +60 -0
  40. package/dist/src/columns/dictionary.d.ts.map +1 -0
  41. package/dist/src/columns/dictionary.js +102 -0
  42. package/dist/src/columns/dictionary.js.map +1 -0
  43. package/dist/src/columns/growable.d.ts +198 -0
  44. package/dist/src/columns/growable.d.ts.map +1 -0
  45. package/dist/src/columns/growable.js +296 -0
  46. package/dist/src/columns/growable.js.map +1 -0
  47. package/dist/src/columns/infer.d.ts +121 -0
  48. package/dist/src/columns/infer.d.ts.map +1 -0
  49. package/dist/src/columns/infer.js +268 -0
  50. package/dist/src/columns/infer.js.map +1 -0
  51. package/dist/src/columns/remap.d.ts +143 -0
  52. package/dist/src/columns/remap.d.ts.map +1 -0
  53. package/dist/src/columns/remap.js +588 -0
  54. package/dist/src/columns/remap.js.map +1 -0
  55. package/dist/src/columns/table.d.ts +184 -0
  56. package/dist/src/columns/table.d.ts.map +1 -0
  57. package/dist/src/columns/table.js +485 -0
  58. package/dist/src/columns/table.js.map +1 -0
  59. package/dist/src/constants.d.ts +34 -0
  60. package/dist/src/constants.d.ts.map +1 -0
  61. package/dist/src/constants.js +79 -0
  62. package/dist/src/constants.js.map +1 -0
  63. package/dist/src/errors.d.ts +76 -0
  64. package/dist/src/errors.d.ts.map +1 -0
  65. package/dist/src/errors.js +32 -0
  66. package/dist/src/errors.js.map +1 -0
  67. package/dist/src/ids/edge-id-index.d.ts +77 -0
  68. package/dist/src/ids/edge-id-index.d.ts.map +1 -0
  69. package/dist/src/ids/edge-id-index.js +155 -0
  70. package/dist/src/ids/edge-id-index.js.map +1 -0
  71. package/dist/src/ids/node-id-map.d.ts +280 -0
  72. package/dist/src/ids/node-id-map.d.ts.map +1 -0
  73. package/dist/src/ids/node-id-map.js +1139 -0
  74. package/dist/src/ids/node-id-map.js.map +1 -0
  75. package/dist/src/ids/string-store.d.ts +219 -0
  76. package/dist/src/ids/string-store.d.ts.map +1 -0
  77. package/dist/src/ids/string-store.js +526 -0
  78. package/dist/src/ids/string-store.js.map +1 -0
  79. package/dist/src/index.d.ts +30 -0
  80. package/dist/src/index.d.ts.map +1 -0
  81. package/dist/src/index.js +29 -0
  82. package/dist/src/index.js.map +1 -0
  83. package/dist/src/populate/from-csr.d.ts +61 -0
  84. package/dist/src/populate/from-csr.d.ts.map +1 -0
  85. package/dist/src/populate/from-csr.js +706 -0
  86. package/dist/src/populate/from-csr.js.map +1 -0
  87. package/dist/src/populate/from-edge-arrays.d.ts +51 -0
  88. package/dist/src/populate/from-edge-arrays.d.ts.map +1 -0
  89. package/dist/src/populate/from-edge-arrays.js +217 -0
  90. package/dist/src/populate/from-edge-arrays.js.map +1 -0
  91. package/dist/src/populate/from-records.d.ts +51 -0
  92. package/dist/src/populate/from-records.d.ts.map +1 -0
  93. package/dist/src/populate/from-records.js +447 -0
  94. package/dist/src/populate/from-records.js.map +1 -0
  95. package/dist/src/snapshot/derived.d.ts +211 -0
  96. package/dist/src/snapshot/derived.d.ts.map +1 -0
  97. package/dist/src/snapshot/derived.js +1254 -0
  98. package/dist/src/snapshot/derived.js.map +1 -0
  99. package/dist/src/snapshot/graph-meta.d.ts +23 -0
  100. package/dist/src/snapshot/graph-meta.d.ts.map +1 -0
  101. package/dist/src/snapshot/graph-meta.js +159 -0
  102. package/dist/src/snapshot/graph-meta.js.map +1 -0
  103. package/dist/src/snapshot/graph-snapshot.d.ts +509 -0
  104. package/dist/src/snapshot/graph-snapshot.d.ts.map +1 -0
  105. package/dist/src/snapshot/graph-snapshot.js +1247 -0
  106. package/dist/src/snapshot/graph-snapshot.js.map +1 -0
  107. package/dist/src/snapshot/hash.d.ts +90 -0
  108. package/dist/src/snapshot/hash.d.ts.map +1 -0
  109. package/dist/src/snapshot/hash.js +228 -0
  110. package/dist/src/snapshot/hash.js.map +1 -0
  111. package/dist/src/snapshot/queries.d.ts +74 -0
  112. package/dist/src/snapshot/queries.d.ts.map +1 -0
  113. package/dist/src/snapshot/queries.js +131 -0
  114. package/dist/src/snapshot/queries.js.map +1 -0
  115. package/dist/src/snapshot/validate.d.ts +192 -0
  116. package/dist/src/snapshot/validate.d.ts.map +1 -0
  117. package/dist/src/snapshot/validate.js +990 -0
  118. package/dist/src/snapshot/validate.js.map +1 -0
  119. package/dist/src/snapshot/views.d.ts +274 -0
  120. package/dist/src/snapshot/views.d.ts.map +1 -0
  121. package/dist/src/snapshot/views.js +856 -0
  122. package/dist/src/snapshot/views.js.map +1 -0
  123. package/dist/src/types/builder.d.ts +456 -0
  124. package/dist/src/types/builder.d.ts.map +1 -0
  125. package/dist/src/types/builder.js +11 -0
  126. package/dist/src/types/builder.js.map +1 -0
  127. package/dist/src/types/columns.d.ts +615 -0
  128. package/dist/src/types/columns.d.ts.map +1 -0
  129. package/dist/src/types/columns.js +14 -0
  130. package/dist/src/types/columns.js.map +1 -0
  131. package/dist/src/types/index.d.ts +14 -0
  132. package/dist/src/types/index.d.ts.map +1 -0
  133. package/dist/src/types/index.js +11 -0
  134. package/dist/src/types/index.js.map +1 -0
  135. package/dist/src/types/internal.d.ts +172 -0
  136. package/dist/src/types/internal.d.ts.map +1 -0
  137. package/dist/src/types/internal.js +13 -0
  138. package/dist/src/types/internal.js.map +1 -0
  139. package/dist/src/types/snapshot.d.ts +801 -0
  140. package/dist/src/types/snapshot.d.ts.map +1 -0
  141. package/dist/src/types/snapshot.js +14 -0
  142. package/dist/src/types/snapshot.js.map +1 -0
  143. package/dist/src/types/wire.d.ts +196 -0
  144. package/dist/src/types/wire.d.ts.map +1 -0
  145. package/dist/src/types/wire.js +8 -0
  146. package/dist/src/types/wire.js.map +1 -0
  147. package/dist/src/util/mask.d.ts +55 -0
  148. package/dist/src/util/mask.d.ts.map +1 -0
  149. package/dist/src/util/mask.js +71 -0
  150. package/dist/src/util/mask.js.map +1 -0
  151. package/dist/src/util/options.d.ts +22 -0
  152. package/dist/src/util/options.d.ts.map +1 -0
  153. package/dist/src/util/options.js +49 -0
  154. package/dist/src/util/options.js.map +1 -0
  155. package/dist/src/util/shared-buffers.d.ts +42 -0
  156. package/dist/src/util/shared-buffers.d.ts.map +1 -0
  157. package/dist/src/util/shared-buffers.js +52 -0
  158. package/dist/src/util/shared-buffers.js.map +1 -0
  159. package/dist/src/util/typed-array.d.ts +205 -0
  160. package/dist/src/util/typed-array.d.ts.map +1 -0
  161. package/dist/src/util/typed-array.js +289 -0
  162. package/dist/src/util/typed-array.js.map +1 -0
  163. package/dist/src/wire/bytes.d.ts +69 -0
  164. package/dist/src/wire/bytes.d.ts.map +1 -0
  165. package/dist/src/wire/bytes.js +361 -0
  166. package/dist/src/wire/bytes.js.map +1 -0
  167. package/dist/src/wire/carried-views.d.ts +111 -0
  168. package/dist/src/wire/carried-views.d.ts.map +1 -0
  169. package/dist/src/wire/carried-views.js +286 -0
  170. package/dist/src/wire/carried-views.js.map +1 -0
  171. package/dist/src/wire/from-wire.d.ts +144 -0
  172. package/dist/src/wire/from-wire.d.ts.map +1 -0
  173. package/dist/src/wire/from-wire.js +1425 -0
  174. package/dist/src/wire/from-wire.js.map +1 -0
  175. package/dist/src/wire/to-wire.d.ts +171 -0
  176. package/dist/src/wire/to-wire.d.ts.map +1 -0
  177. package/dist/src/wire/to-wire.js +652 -0
  178. package/dist/src/wire/to-wire.js.map +1 -0
  179. package/dist/tsconfig.build.tsbuildinfo +1 -0
  180. package/package.json +72 -7
  181. package/src/builder/arena.ts +192 -0
  182. package/src/builder/compact.ts +1811 -0
  183. package/src/builder/counting-sort.ts +506 -0
  184. package/src/builder/freeze.ts +689 -0
  185. package/src/builder/graph-builder.ts +2264 -0
  186. package/src/builder/options.ts +29 -0
  187. package/src/columns/bitmap.ts +196 -0
  188. package/src/columns/column.ts +2574 -0
  189. package/src/columns/dictionary.ts +114 -0
  190. package/src/columns/growable.ts +350 -0
  191. package/src/columns/infer.ts +285 -0
  192. package/src/columns/remap.ts +663 -0
  193. package/src/columns/table.ts +568 -0
  194. package/src/constants.ts +89 -0
  195. package/src/errors.ts +115 -0
  196. package/src/ids/edge-id-index.ts +179 -0
  197. package/src/ids/node-id-map.ts +1340 -0
  198. package/src/ids/string-store.ts +589 -0
  199. package/src/index.ts +139 -0
  200. package/src/lib-resizable-array-buffer.d.ts +34 -0
  201. package/src/populate/from-csr.ts +802 -0
  202. package/src/populate/from-edge-arrays.ts +257 -0
  203. package/src/populate/from-records.ts +536 -0
  204. package/src/snapshot/derived.ts +1486 -0
  205. package/src/snapshot/graph-meta.ts +167 -0
  206. package/src/snapshot/graph-snapshot.ts +1503 -0
  207. package/src/snapshot/hash.ts +241 -0
  208. package/src/snapshot/queries.ts +136 -0
  209. package/src/snapshot/validate.ts +1108 -0
  210. package/src/snapshot/views.ts +943 -0
  211. package/src/types/builder.ts +480 -0
  212. package/src/types/columns.ts +727 -0
  213. package/src/types/index.ts +14 -0
  214. package/src/types/internal.ts +195 -0
  215. package/src/types/snapshot.ts +886 -0
  216. package/src/types/wire.ts +207 -0
  217. package/src/util/mask.ts +89 -0
  218. package/src/util/options.ts +57 -0
  219. package/src/util/shared-buffers.ts +56 -0
  220. package/src/util/typed-array.ts +371 -0
  221. package/src/wire/bytes.ts +440 -0
  222. package/src/wire/carried-views.ts +327 -0
  223. package/src/wire/from-wire.ts +1690 -0
  224. package/src/wire/to-wire.ts +755 -0
@@ -0,0 +1,602 @@
1
+ /**
2
+ * GraphBuilder: the only mutable object in the package and the producer of snapshots (design
3
+ * section 6). A long-lived, structure-of-arrays accumulator (compact.ts) that can be frozen
4
+ * repeatedly through the pipeline of freeze.ts. Node indices are assigned in first-seen order and
5
+ * edge indices in addEdge order (invariant I14); removal tombstones in O(degree) through the two
6
+ * incidence lists; a compacting freeze renumbers the builder's own indices to equal the new
7
+ * snapshot's (decision C7) and reports the remaps; freeze() never shares core arrays or columns with
8
+ * the snapshot (I18) while the id `Map` and `ids` array are shared by design (section 4.2).
9
+ *
10
+ * Every public method and getter throws E_BUILDER_DISPOSED after dispose(); every throw leaves the
11
+ * builder in a consistent state (design section 11.1): the failing operation is not applied (the
12
+ * record, composition and expansion methods validate everything they will write before the first
13
+ * mutation), and a freeze that fails commits nothing.
14
+ */
15
+ import { type BuilderOptionsPatch, type ColumnDecl, type ColumnDeclPatch, type ColumnHandle, type Dtype, type ExtensionHandle, type F32, type F64, type FreezeOptions, type FreezeReport, type GraphBuilderContract, type GraphBuilderOptions, type GraphMetaPatch, type GraphSnapshot, type NodeId, type ResolvedBuilderOptions, type SetDirectedOptions, type TypedArrayData, type U32 } from "../types/index.js";
16
+ /**
17
+ * The mutable accumulator that produces frozen snapshots (design sections 6 and 12.2). Construct
18
+ * with `{ directed }` (required) and the policies of GraphBuilderOptions; push nodes and edges by id
19
+ * or by index; declare and write attribute columns; call `freeze()` as often as needed. Implements
20
+ * GraphSink, the subset importers program against (design section 8.3).
21
+ */
22
+ export declare class GraphBuilder implements GraphBuilderContract {
23
+ private readonly fixed;
24
+ private directedValue;
25
+ private locked;
26
+ private optionsCache;
27
+ private staging;
28
+ /** Column name -> index of the node staging columns; rebuilt when the column array is replaced. */
29
+ private nodeNames;
30
+ /** Column name -> index of the edge staging columns; rebuilt when the column array is replaced. */
31
+ private edgeNames;
32
+ private graphValues;
33
+ private metaValue;
34
+ private widenings;
35
+ private mutations;
36
+ private dirtyFlag;
37
+ private disposed;
38
+ /**
39
+ * Create an empty builder.
40
+ * @param options - the options; `directed` is required
41
+ */
42
+ constructor(options: GraphBuilderOptions);
43
+ /**
44
+ * Seed a builder from a snapshot in O(n + m) (design section 6.6): ids, edges in logical order
45
+ * with their declared orientation, weights (through the role-"weight" column when present, so an
46
+ * f64 shadow and the explicit / omitted record survive), columns, extension tables and meta;
47
+ * indices are preserved. The staging precision follows an f64 shadow unless the patch says
48
+ * otherwise.
49
+ * @param snapshot - the snapshot to continue
50
+ * @param options - option overrides; `directed` defaults to the snapshot's
51
+ * @returns the builder
52
+ */
53
+ static from(snapshot: GraphSnapshot, options?: BuilderOptionsPatch): GraphBuilder;
54
+ /**
55
+ * The resolved options; `directed` is the current value.
56
+ * @returns the options
57
+ */
58
+ get options(): ResolvedBuilderOptions;
59
+ /**
60
+ * The current direction.
61
+ * @returns true when directed
62
+ */
63
+ get directed(): boolean;
64
+ /**
65
+ * Whether lockDirected() was called.
66
+ * @returns true when locked
67
+ */
68
+ get directedLocked(): boolean;
69
+ /**
70
+ * Live node count.
71
+ * @returns the count
72
+ */
73
+ get nodeCount(): number;
74
+ /**
75
+ * Live edge count (exact, from the incidence lists).
76
+ * @returns the count
77
+ */
78
+ get edgeCount(): number;
79
+ /**
80
+ * Next node index to be assigned.
81
+ * @returns the bound
82
+ */
83
+ get nodeBound(): number;
84
+ /**
85
+ * Next logical edge index to be assigned.
86
+ * @returns the bound
87
+ */
88
+ get edgeBound(): number;
89
+ /**
90
+ * Increments on every topology or weight mutation; column writes and freeze() do not count.
91
+ * @returns the count
92
+ */
93
+ get mutationCount(): number;
94
+ /**
95
+ * Whether the builder was mutated since the last freeze() (true for a builder never frozen).
96
+ * @returns true when a fresh freeze would differ from the last one
97
+ */
98
+ get dirty(): boolean;
99
+ /**
100
+ * Change the direction (design section 6.6): a no-op when unchanged; free while no live edge
101
+ * exists; with live edges only undirected -> directed with `expand`, which appends a mirror edge
102
+ * for every live edge and writes the graphty.directed / graphty.pair columns. E_DIRECTED when
103
+ * locked or refused.
104
+ * @param directed - the new direction
105
+ * @param options - `expand` for the in-place expansion
106
+ */
107
+ setDirected(directed: boolean, options?: SetDirectedOptions): void;
108
+ /** Fix the direction: every later changing setDirected() throws E_DIRECTED. */
109
+ lockDirected(): void;
110
+ /**
111
+ * Add a node, or return the index of the live node with this id; a tombstoned id is revived at
112
+ * its old index (design section 6.6).
113
+ * @param id - the node id; E_INVALID_ID when illegal
114
+ * @returns the node index
115
+ */
116
+ addNode(id: NodeId): number;
117
+ /**
118
+ * Add many nodes, writing every id's index (new or existing) into `out`.
119
+ * @param ids - the ids
120
+ * @param out - receives the indices; allocated when omitted; E_COLUMN_LENGTH when too short
121
+ * @returns `out`
122
+ */
123
+ addNodes(ids: Iterable<NodeId>, out?: U32): U32;
124
+ /**
125
+ * Append `count` nodes whose ids are their own indices, never touching the id Map while every
126
+ * node is anonymous (design section 6.6).
127
+ * @param count - how many; E_TOO_LARGE beyond MAX_COUNT; E_DUPLICATE_ID when an index is already an id
128
+ * @returns the first new index
129
+ */
130
+ addAnonymousNodes(count: number): number;
131
+ /**
132
+ * Whether a live node has this id (total: an illegal id is simply absent).
133
+ * @param id - the id
134
+ * @returns true when present and alive
135
+ */
136
+ hasNode(id: NodeId): boolean;
137
+ /**
138
+ * Total lookup of a live node.
139
+ * @param id - the id
140
+ * @returns the index, or INVALID_INDEX
141
+ */
142
+ indexOf(id: NodeId): number;
143
+ /**
144
+ * The id of a live node index.
145
+ * @param index - the index; E_INDEX_RANGE when out of range or tombstoned
146
+ * @returns the id
147
+ */
148
+ idOf(index: number): NodeId;
149
+ /**
150
+ * Tombstone a node and every live incident edge (O(degree)); bumps mutationCount.
151
+ * @param id - the id; E_UNKNOWN_NODE when absent or already removed
152
+ * @returns the removed live incident edge indices, ascending
153
+ */
154
+ removeNode(id: NodeId): U32;
155
+ /**
156
+ * Tombstone a node by index and every live incident edge.
157
+ * @param index - the index; E_UNKNOWN_NODE (details.index) when out of range or removed
158
+ * @returns the removed live incident edge indices, ascending
159
+ */
160
+ removeNodeByIndex(index: number): U32;
161
+ /**
162
+ * Grow staging capacity ahead of a bulk push.
163
+ * @param nodes - the node count to fit
164
+ * @param edges - the edge count to fit
165
+ */
166
+ reserve(nodes?: number, edges?: number): void;
167
+ /**
168
+ * Add a logical edge by id; unknown endpoints are created when addMissingNodes is set (a
169
+ * tombstoned endpoint is revived), else E_UNKNOWN_NODE. A NaN weight is E_INVALID_WEIGHT.
170
+ * @param source - source id
171
+ * @param target - target id
172
+ * @param weight - the weight; 1 when omitted
173
+ * @returns the logical edge index
174
+ */
175
+ addEdge(source: NodeId, target: NodeId, weight?: number): number;
176
+ /**
177
+ * Add a logical edge by node index.
178
+ * @param u - source index; E_UNKNOWN_NODE (details.index) when out of range or removed
179
+ * @param v - target index
180
+ * @param weight - the weight; 1 when omitted
181
+ * @returns the logical edge index
182
+ */
183
+ addEdgeByIndex(u: number, v: number, weight?: number): number;
184
+ /**
185
+ * Bulk add edges by node index (the index-space path used with addAnonymousNodes). Everything is
186
+ * validated before the first edge is pushed.
187
+ * @param src - source indices
188
+ * @param dst - target indices; E_COLUMN_LENGTH when the lengths differ
189
+ * @param weights - per-edge weights; 1 when omitted; E_INVALID_WEIGHT for NaN
190
+ * @returns the first new logical edge index
191
+ */
192
+ addEdges(src: U32, dst: U32, weights?: F32 | F64): number;
193
+ /**
194
+ * Bulk add edges by id. Every id and weight is validated before anything is added.
195
+ * @param src - source ids
196
+ * @param dst - target ids; E_COLUMN_LENGTH when the lengths differ
197
+ * @param weights - per-edge weights; 1 when omitted
198
+ * @returns the first new logical edge index
199
+ */
200
+ addEdgesByIds(src: ArrayLike<NodeId>, dst: ArrayLike<NodeId>, weights?: ArrayLike<number>): number;
201
+ /**
202
+ * Tombstone an edge (O(1)); bumps mutationCount when something was removed.
203
+ * @param edge - the logical edge index
204
+ * @returns true when a live edge was removed
205
+ */
206
+ removeEdge(edge: number): boolean;
207
+ /**
208
+ * Whether an edge index is live.
209
+ * @param edge - the logical edge index
210
+ * @returns true when live
211
+ */
212
+ hasEdge(edge: number): boolean;
213
+ /**
214
+ * Read a live edge's endpoints back.
215
+ * @param edge - the logical edge index; E_INDEX_RANGE when out of range or removed
216
+ * @returns [source index, target index] in declared orientation
217
+ */
218
+ edgeEndpoints(edge: number): readonly [source: number, target: number];
219
+ /**
220
+ * Read a live edge's weight back.
221
+ * @param edge - the logical edge index; E_INDEX_RANGE when out of range or removed
222
+ * @returns the weight (1 when unweighted)
223
+ */
224
+ edgeWeight(edge: number): number;
225
+ /**
226
+ * Set the weight of a live edge, allocating the weight array on first use and marking the weight
227
+ * explicit; bumps mutationCount.
228
+ * @param edge - the logical edge index; E_INDEX_RANGE when out of range or removed
229
+ * @param weight - the weight; E_INVALID_WEIGHT for NaN
230
+ */
231
+ setEdgeWeight(edge: number, weight: number): void;
232
+ /**
233
+ * Live edges leaving a node, from the out-list (O(degree)). On an undirected builder every
234
+ * incident edge leaves the node (invariant I7, the snapshot's row holds both orientations), so
235
+ * both lists are walked and a self-loop is listed once.
236
+ * @param index - the node index; E_INDEX_RANGE when out of range
237
+ * @returns a fresh ascending array of live edge indices
238
+ */
239
+ outEdgesOf(index: number): U32;
240
+ /**
241
+ * Live edges entering a node, from the in-list (O(degree)); on an undirected builder the same
242
+ * set as outEdgesOf (the alias rule of inDegree === outDegree).
243
+ * @param index - the node index; E_INDEX_RANGE when out of range
244
+ * @returns a fresh ascending array of live edge indices
245
+ */
246
+ inEdgesOf(index: number): U32;
247
+ /**
248
+ * Live edges u -> v (undirected: either orientation), from the incidence lists.
249
+ * @param u - source index; E_INDEX_RANGE when out of range
250
+ * @param v - target index; E_INDEX_RANGE when out of range
251
+ * @returns a fresh ascending array of live edge indices
252
+ */
253
+ findEdges(u: number, v: number): U32;
254
+ /**
255
+ * Declare a node column; the same shape again returns the existing handle, a different shape is
256
+ * E_COLUMN_EXISTS, a taken role E_DUPLICATE_ROLE.
257
+ * @param decl - the declaration
258
+ * @returns the column handle
259
+ */
260
+ declareNodeColumn(decl: ColumnDecl): ColumnHandle;
261
+ /**
262
+ * Declare an edge column; the same shape again returns the existing handle, a different shape is
263
+ * E_COLUMN_EXISTS, a taken role E_DUPLICATE_ROLE.
264
+ * @param decl - the declaration
265
+ * @returns the column handle
266
+ */
267
+ declareEdgeColumn(decl: ColumnDecl): ColumnHandle;
268
+ /**
269
+ * Look up a node column handle.
270
+ * @param name - the column name
271
+ * @returns the handle, or INVALID_INDEX when absent
272
+ */
273
+ nodeColumn(name: string): ColumnHandle;
274
+ /**
275
+ * Look up an edge column handle.
276
+ * @param name - the column name
277
+ * @returns the handle, or INVALID_INDEX when absent
278
+ */
279
+ edgeColumn(name: string): ColumnHandle;
280
+ /**
281
+ * Set one node cell; a string column name auto-declares an inferred column (design section 5.1)
282
+ * on the first set value, and an unset value for an undeclared name is a no-op.
283
+ * @param column - the handle (E_UNKNOWN_COLUMN when stale) or name
284
+ * @param index - the node index; E_INDEX_RANGE when out of range
285
+ * @param value - the value; undefined / null unset the row
286
+ */
287
+ setNodeValue(column: ColumnHandle | string, index: number, value: unknown): void;
288
+ /**
289
+ * Set one edge cell; a string column name auto-declares an inferred column.
290
+ * @param column - the handle (E_UNKNOWN_COLUMN when stale) or name
291
+ * @param edge - the logical edge index; E_INDEX_RANGE when out of range
292
+ * @param value - the value; undefined / null unset the row
293
+ */
294
+ setEdgeValue(column: ColumnHandle | string, edge: number, value: unknown): void;
295
+ /**
296
+ * Widen an inferred node column to a wider dtype of the design section 5.1 order without
297
+ * changing any value (an importer that knows from the lexical grammar that a column of `2.0`
298
+ * cells is f64 although every value so far was integral). A no-op when the column is already
299
+ * as wide; E_COLUMN_TYPE for a declared (non-inferred) column, a dtype outside the inference
300
+ * order or a narrower one; the widening is reported in FreezeReport.widened.
301
+ * @param column - the handle (E_UNKNOWN_COLUMN when stale) or name (E_UNKNOWN_COLUMN when absent)
302
+ * @param dtype - the dtype to widen to
303
+ */
304
+ widenNodeColumn(column: ColumnHandle | string, dtype: Dtype): void;
305
+ /**
306
+ * Widen an inferred edge column to a wider dtype of the design section 5.1 order without
307
+ * changing any value; see widenNodeColumn().
308
+ * @param column - the handle (E_UNKNOWN_COLUMN when stale) or name (E_UNKNOWN_COLUMN when absent)
309
+ * @param dtype - the dtype to widen to
310
+ */
311
+ widenEdgeColumn(column: ColumnHandle | string, dtype: Dtype): void;
312
+ /**
313
+ * Bulk-set a node column from a typed array (copied into staging); replaces a column of the same
314
+ * name. The length must be nodeBound * components (bool: ceil(nodeBound / 32) words).
315
+ * @param name - the column name
316
+ * @param data - the values
317
+ * @param decl - declaration fields (dtype defaults to the array's)
318
+ */
319
+ setNodeColumn(name: string, data: TypedArrayData, decl?: ColumnDeclPatch): void;
320
+ /**
321
+ * Bulk-set an edge column from a typed array (copied into staging); replaces a column of the same
322
+ * name. The length must be edgeBound * components.
323
+ * @param name - the column name
324
+ * @param data - the values
325
+ * @param decl - declaration fields (dtype defaults to the array's)
326
+ */
327
+ setEdgeColumn(name: string, data: TypedArrayData, decl?: ColumnDeclPatch): void;
328
+ /**
329
+ * Set a graph-level attribute (the graph table's single row); the value and declaration are
330
+ * checked now, the column is built at freeze.
331
+ * @param name - the column name
332
+ * @param value - the value; undefined unsets it
333
+ * @param decl - declaration fields for the column
334
+ */
335
+ setGraphValue(name: string, value: unknown, decl?: ColumnDeclPatch): void;
336
+ /**
337
+ * Merge fields into the graph metadata (design section 5.9); undefined fields are left alone,
338
+ * `extra` must be a JSON value (E_COLUMN_TYPE with details.field otherwise).
339
+ * @param meta - the fields to set
340
+ */
341
+ setMeta(meta: GraphMetaPatch): void;
342
+ /**
343
+ * Create an extension table (design section 5.10).
344
+ * @param name - the table name; E_COLUMN_EXISTS when taken
345
+ * @param decls - its columns; E_COLUMN_EXISTS for a repeated name, E_DUPLICATE_ROLE for a repeated role
346
+ * @returns the table handle
347
+ */
348
+ addExtensionTable(name: string, decls: readonly ColumnDecl[]): ExtensionHandle;
349
+ /**
350
+ * Append a row to an extension table.
351
+ * @param table - the table handle; E_INDEX_RANGE when unknown
352
+ * @param values - one value per declared column; E_COLUMN_LENGTH otherwise
353
+ * @returns the new row index
354
+ */
355
+ addExtensionRow(table: ExtensionHandle, values: readonly unknown[]): number;
356
+ /**
357
+ * Add a node from a record: every key present overwrites that row (last-write-wins per attribute,
358
+ * design section 6.6), auto-declaring inferred columns.
359
+ * @param id - the node id
360
+ * @param attrs - attribute values keyed by column name
361
+ * @returns the node index
362
+ */
363
+ addNodeRecord(id: NodeId, attrs: Readonly<Record<string, unknown>>): number;
364
+ /**
365
+ * Add an edge from a record; always a new edge (parallels are kept). The weight comes from
366
+ * `weightKey` ("weight" by default; null = none) and must be a number (E_INVALID_WEIGHT).
367
+ * @param source - source id
368
+ * @param target - target id
369
+ * @param attrs - attribute values keyed by column name
370
+ * @param weightKey - the key holding the weight; default "weight"; null = no weight
371
+ * @returns the logical edge index
372
+ */
373
+ addEdgeRecord(source: NodeId, target: NodeId, attrs: Readonly<Record<string, unknown>>, weightKey?: string | null): number;
374
+ /**
375
+ * Append another snapshot (design section 6.6): nodes are merged by id ("merge": the incoming set
376
+ * rows overwrite; "error": E_DUPLICATE_ID), edges are appended in logical order with their
377
+ * declared orientation and weights, columns declared in both graphs widen to the union dtype of
378
+ * design section 5.1, dictionaries are re-interned, extension tables are appended with their
379
+ * references rewritten, and graph attributes overwrite by name.
380
+ * @param snapshot - the snapshot to append
381
+ * @param options - duplicate-id handling
382
+ * @param options.onDuplicateNode - "merge" (default) or "error"
383
+ */
384
+ addGraph(snapshot: GraphSnapshot, options?: {
385
+ readonly onDuplicateNode?: "merge" | "error" | undefined;
386
+ }): void;
387
+ /**
388
+ * Run the freeze pipeline of design section 6.3 and return a snapshot; the builder keeps its
389
+ * staging (compacted and renumbered when tombstones existed, rewritten by a merge policy) unless
390
+ * `release` is set.
391
+ * @param options - the freeze options
392
+ * @returns the snapshot
393
+ */
394
+ freeze(options?: FreezeOptions): GraphSnapshot;
395
+ /**
396
+ * freeze() plus the report of what was renumbered, merged, dropped and widened (design section
397
+ * 6.6): the remaps are relative to the previous freeze (the builder's own index space on the
398
+ * first) and null exactly when nothing was renumbered.
399
+ * @param options - the freeze options
400
+ * @returns the snapshot and its report
401
+ */
402
+ freezeWithReport(options?: FreezeOptions): {
403
+ snapshot: GraphSnapshot;
404
+ report: FreezeReport;
405
+ };
406
+ /** Empty the builder (nodes, edges, columns, extension tables, graph attributes, meta), keeping its options and lock. */
407
+ clear(): void;
408
+ /** Release everything; every further call throws E_BUILDER_DISPOSED. */
409
+ dispose(): void;
410
+ /**
411
+ * Bytes of typed staging currently held (capacity, not length; JS arrays and the id Map excluded).
412
+ * @returns the byte count
413
+ */
414
+ byteLength(): number;
415
+ private check;
416
+ private mutated;
417
+ private freshStaging;
418
+ /**
419
+ * The index a validated id would get from addValidatedNode: its existing (live or tombstoned)
420
+ * index, or the next one.
421
+ * @param id - a validated id
422
+ * @returns the prospective index
423
+ */
424
+ private prospectiveNodeIndex;
425
+ /**
426
+ * The live index of an id, total.
427
+ * @param id - any value
428
+ * @returns the index, or INVALID_INDEX when absent, illegal or tombstoned
429
+ */
430
+ private lookup;
431
+ private isLiveNode;
432
+ private isLiveEdge;
433
+ private checkNodeIndex;
434
+ private checkEdgeIndex;
435
+ private checkLiveNode;
436
+ private checkEdge;
437
+ private checkNodeLimit;
438
+ /**
439
+ * The E_TOO_LARGE check of invariant I3 at the add* call that would cross the limit: the edge
440
+ * index space and the live arc count (doubled for an undirected graph, loops once) must both
441
+ * stay at or below MAX_COUNT.
442
+ * @param addingEdges - edges about to be added
443
+ * @param addingArcs - arcs they contribute (1 per directed edge or loop, 2 per undirected non-loop)
444
+ */
445
+ private checkEdgeLimit;
446
+ /**
447
+ * The arcs a batch of edges contributes.
448
+ * @param src - sources
449
+ * @param dst - targets
450
+ * @param count - how many
451
+ * @returns the arc count
452
+ */
453
+ private arcsOf;
454
+ /**
455
+ * Add or revive a validated id.
456
+ * @param id - a validated id
457
+ * @returns the index
458
+ */
459
+ private addValidatedNode;
460
+ /**
461
+ * Resolve an edge endpoint id: the live index, a revived or new node under addMissingNodes, or
462
+ * E_UNKNOWN_NODE.
463
+ * @param id - a validated id
464
+ * @returns the index
465
+ */
466
+ private resolveEndpoint;
467
+ private requireLive;
468
+ private removeLiveNode;
469
+ /**
470
+ * Validate a weight argument: NaN is E_INVALID_WEIGHT; on an unweighted (`weighted: false`) builder
471
+ * only 1 is accepted and it is treated as omitted.
472
+ * @param weight - the argument
473
+ * @param edge - the bulk position, for the error details
474
+ * @returns the weight to store, or undefined when omitted
475
+ */
476
+ private checkWeight;
477
+ private pushEdge;
478
+ /**
479
+ * The in-place expansion of design section 6.6: every live edge u -> v gets a mirror v -> u at a
480
+ * new index (loops are not mirrored), graphty.directed is 0 for both halves and graphty.pair links
481
+ * them; every other column's mirror rows stay unset.
482
+ */
483
+ private expandToDirected;
484
+ private columnsOf;
485
+ private handleOf;
486
+ /**
487
+ * The index of a staging column by name in O(1): a Map beside each column array, rebuilt when
488
+ * the array is replaced (a fresh staging, a compaction) and kept in step by pushColumn().
489
+ * Column names never change, so the map is invalidated only by identity or length.
490
+ * @param columns - the node or edge staging columns
491
+ * @param name - the column name
492
+ * @returns the index, or -1 when absent
493
+ */
494
+ private columnIndex;
495
+ /**
496
+ * Append a staging column and keep the name index in step.
497
+ * @param columns - the node or edge staging columns
498
+ * @param column - the column to append
499
+ * @returns the new column's index
500
+ */
501
+ private pushColumn;
502
+ /**
503
+ * Declare a column (design section 11.3): the same shape returns the existing handle, another
504
+ * shape is E_COLUMN_EXISTS, a role held by another column E_DUPLICATE_ROLE.
505
+ * @param domain - node or edge
506
+ * @param decl - the declaration
507
+ * @returns the handle
508
+ */
509
+ private declare;
510
+ /**
511
+ * The checks of declare() without applying anything: the resolved metadata and, when a column
512
+ * of the same shape exists, its handle.
513
+ * @param domain - node or edge
514
+ * @param decl - the declaration
515
+ * @returns the metadata and the existing handle (INVALID_INDEX when the column is new)
516
+ */
517
+ private checkDeclaration;
518
+ /**
519
+ * The staging column a handle or name refers to, auto-declaring an inferred column for an unknown
520
+ * name when the value is set.
521
+ * @param domain - node or edge
522
+ * @param column - the handle or name
523
+ * @param value - the value about to be written (decides the inferred dtype)
524
+ * @returns the column, or null when an unknown name receives an unset value
525
+ */
526
+ private resolveColumn;
527
+ /**
528
+ * Validate every value of a record against the columns it would be written to, without writing
529
+ * (design section 11.1: a record whose value is refused is not applied at all). An existing
530
+ * column checks the value as its `write` would; a new name must be inferrable (a JSON value or a
531
+ * well-formed string) unless the value is unset.
532
+ * @param domain - node or edge
533
+ * @param row - the row the record is meant for (error details only)
534
+ * @param keys - the record keys
535
+ * @param attrs - the record
536
+ */
537
+ private checkCells;
538
+ /**
539
+ * The refersTo range rule of invariant I12 at the write: an index-valued cell of a refersTo
540
+ * column must be below the referenced space's current bound (a tombstoned target is a dangling
541
+ * reference the next compaction resolves) or INVALID_INDEX; E_INDEX_RANGE otherwise. A scalar
542
+ * INVALID_INDEX means "no reference" and is written as an unset row (E_COLUMN_TYPE on a
543
+ * non-nullable column, which cannot hold it). Values of other shapes are left to the column's
544
+ * own type check.
545
+ * @param meta - the column
546
+ * @param value - the value about to be written
547
+ * @returns the value to write (undefined for a scalar INVALID_INDEX)
548
+ */
549
+ private checkReference;
550
+ /**
551
+ * The checks copyColumn would fail on before it writes anything: a new column's role must be
552
+ * free (E_DUPLICATE_ROLE).
553
+ * @param domain - node or edge
554
+ * @param column - the incoming column
555
+ */
556
+ private checkIncomingColumn;
557
+ /**
558
+ * The checks appendExtension would fail on before it writes anything: an existing table of the
559
+ * same name must hold every incoming column (E_UNKNOWN_COLUMN); a new table's declarations must
560
+ * resolve (E_COLUMN_EXISTS / E_DUPLICATE_ROLE).
561
+ * @param name - the table name
562
+ * @param table - the incoming table
563
+ */
564
+ private checkIncomingExtension;
565
+ /**
566
+ * The widening of widenNodeColumn / widenEdgeColumn.
567
+ * @param domain - node or edge
568
+ * @param column - the handle or name
569
+ * @param dtype - the dtype to widen to
570
+ */
571
+ private widenColumn;
572
+ private writeCell;
573
+ /**
574
+ * Replace or create a column from a typed array (setNodeColumn / setEdgeColumn).
575
+ * @param domain - node or edge
576
+ * @param rows - the table's current bound
577
+ * @param name - the column name
578
+ * @param data - the values
579
+ * @param decl - the declaration patch
580
+ */
581
+ private setBulkColumn;
582
+ private extensionOf;
583
+ /**
584
+ * Copy a snapshot column into the builder (addGraph): declared under the same metadata when the
585
+ * name is new, else widened to the union dtype (design section 6.6); every set row is written
586
+ * through `rowMap`, with refersTo values rewritten through `refs`.
587
+ * @param domain - node or edge
588
+ * @param column - the source column
589
+ * @param rowMap - source row -> builder row
590
+ * @param refs - source node / edge index -> builder index
591
+ */
592
+ private copyColumn;
593
+ /**
594
+ * Append the rows of a snapshot extension table (addGraph): into the table of the same name when
595
+ * the columns match, else a new table is declared from the source columns.
596
+ * @param name - the table name
597
+ * @param table - the source table
598
+ * @param refs - source node / edge index -> builder index
599
+ */
600
+ private appendExtension;
601
+ }
602
+ //# sourceMappingURL=graph-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-builder.d.ts","sourceRoot":"","sources":["../../../src/builder/graph-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,OAAO,EACH,KAAK,mBAAmB,EAExB,KAAK,UAAU,EACf,KAAK,eAAe,EAEpB,KAAK,YAAY,EAEjB,KAAK,KAAK,EAEV,KAAK,eAAe,EACpB,KAAK,GAAG,EACR,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,GAAG,EACX,MAAM,mBAAmB,CAAC;AA+I3B;;;;;GAKG;AACH,qBAAa,YAAa,YAAW,oBAAoB;IACrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IAErC,OAAO,CAAC,aAAa,CAAU;IAE/B,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,YAAY,CAAuC;IAE3D,OAAO,CAAC,OAAO,CAAU;IAEzB,mGAAmG;IACnG,OAAO,CAAC,SAAS,CAAgC;IAEjD,mGAAmG;IACnG,OAAO,CAAC,SAAS,CAAgC;IAEjD,OAAO,CAAC,WAAW,CAAiC;IAEpD,OAAO,CAAC,SAAS,CAA+B;IAEhD,OAAO,CAAC,SAAS,CAAkB;IAEnC,OAAO,CAAC,SAAS,CAAK;IAEtB,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;OAGG;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