@hviana/sema 0.1.4 → 0.1.5
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/dist/example/demo.js +25 -25
- package/dist/example/train_base.d.ts +21 -19
- package/dist/example/train_base.js +1952 -1684
- package/dist/src/alphabet.d.ts +3 -3
- package/dist/src/alphabet.js +27 -24
- package/dist/src/alu/src/alu.d.ts +194 -169
- package/dist/src/alu/src/alu.js +414 -374
- package/dist/src/alu/src/expr.d.ts +43 -36
- package/dist/src/alu/src/expr.js +278 -252
- package/dist/src/alu/src/index.d.ts +98 -9
- package/dist/src/alu/src/index.js +63 -9
- package/dist/src/alu/src/kernel-arith.d.ts +5 -1
- package/dist/src/alu/src/kernel-arith.js +285 -195
- package/dist/src/alu/src/kernel-bits.d.ts +5 -1
- package/dist/src/alu/src/kernel-bits.js +115 -81
- package/dist/src/alu/src/kernel-logic.js +63 -33
- package/dist/src/alu/src/kernel-nd.js +195 -155
- package/dist/src/alu/src/kernel-numeric.d.ts +80 -16
- package/dist/src/alu/src/kernel-numeric.js +331 -259
- package/dist/src/alu/src/operation.d.ts +132 -112
- package/dist/src/alu/src/operation.js +163 -149
- package/dist/src/alu/src/parser.d.ts +175 -168
- package/dist/src/alu/src/parser.js +421 -382
- package/dist/src/alu/src/resonance.d.ts +25 -16
- package/dist/src/alu/src/resonance.js +56 -49
- package/dist/src/alu/src/text.d.ts +7 -3
- package/dist/src/alu/src/text.js +37 -31
- package/dist/src/alu/src/value.d.ts +14 -14
- package/dist/src/alu/src/value.js +160 -150
- package/dist/src/alu/test/alu.test.js +656 -543
- package/dist/src/bytes.d.ts +5 -1
- package/dist/src/bytes.js +40 -33
- package/dist/src/config.d.ts +102 -102
- package/dist/src/config.js +83 -83
- package/dist/src/derive/src/deduction.d.ts +62 -60
- package/dist/src/derive/src/deduction.js +109 -103
- package/dist/src/derive/src/index.d.ts +7 -1
- package/dist/src/derive/src/priority-queue.d.ts +8 -8
- package/dist/src/derive/src/priority-queue.js +61 -57
- package/dist/src/derive/src/rewrite.d.ts +18 -15
- package/dist/src/derive/src/rewrite.js +67 -59
- package/dist/src/derive/src/trie.d.ts +56 -56
- package/dist/src/derive/src/trie.js +179 -175
- package/dist/src/derive/test/derive.test.js +100 -96
- package/dist/src/extension.d.ts +16 -13
- package/dist/src/geometry.d.ts +42 -17
- package/dist/src/geometry.js +266 -235
- package/dist/src/index.d.ts +17 -2
- package/dist/src/index.js +7 -1
- package/dist/src/ingest-cache.d.ts +30 -25
- package/dist/src/ingest-cache.js +127 -108
- package/dist/src/mind/articulation.d.ts +5 -1
- package/dist/src/mind/articulation.js +112 -77
- package/dist/src/mind/attention.d.ts +108 -40
- package/dist/src/mind/attention.js +871 -749
- package/dist/src/mind/canonical.d.ts +19 -4
- package/dist/src/mind/canonical.js +31 -27
- package/dist/src/mind/graph-search.d.ts +225 -201
- package/dist/src/mind/graph-search.js +821 -742
- package/dist/src/mind/index.d.ts +10 -2
- package/dist/src/mind/junction.d.ts +58 -31
- package/dist/src/mind/junction.js +237 -172
- package/dist/src/mind/learning.d.ts +52 -16
- package/dist/src/mind/learning.js +165 -143
- package/dist/src/mind/match.d.ts +69 -20
- package/dist/src/mind/match.js +318 -259
- package/dist/src/mind/mechanisms/alu.js +16 -16
- package/dist/src/mind/mechanisms/cast.d.ts +13 -9
- package/dist/src/mind/mechanisms/cast.js +456 -363
- package/dist/src/mind/mechanisms/confluence.d.ts +12 -8
- package/dist/src/mind/mechanisms/confluence.js +183 -152
- package/dist/src/mind/mechanisms/cover.d.ts +8 -2
- package/dist/src/mind/mechanisms/cover.js +210 -148
- package/dist/src/mind/mechanisms/extraction.d.ts +34 -8
- package/dist/src/mind/mechanisms/extraction.js +288 -234
- package/dist/src/mind/mechanisms/recall.d.ts +10 -6
- package/dist/src/mind/mechanisms/recall.js +185 -126
- package/dist/src/mind/mind.d.ts +154 -129
- package/dist/src/mind/mind.js +288 -258
- package/dist/src/mind/pipeline-mechanism.d.ts +124 -112
- package/dist/src/mind/pipeline-mechanism.js +172 -161
- package/dist/src/mind/pipeline.d.ts +14 -4
- package/dist/src/mind/pipeline.js +189 -125
- package/dist/src/mind/primitives.d.ts +32 -8
- package/dist/src/mind/primitives.js +117 -99
- package/dist/src/mind/rationale.d.ts +98 -86
- package/dist/src/mind/rationale.js +121 -113
- package/dist/src/mind/reasoning.d.ts +13 -2
- package/dist/src/mind/reasoning.js +166 -129
- package/dist/src/mind/recognition.d.ts +4 -1
- package/dist/src/mind/recognition.js +208 -183
- package/dist/src/mind/resonance.d.ts +22 -5
- package/dist/src/mind/resonance.js +0 -0
- package/dist/src/mind/trace.d.ts +25 -6
- package/dist/src/mind/trace.js +58 -50
- package/dist/src/mind/traverse.d.ts +58 -16
- package/dist/src/mind/traverse.js +357 -304
- package/dist/src/mind/types.d.ts +127 -120
- package/dist/src/mind/types.js +69 -60
- package/dist/src/rabitq-hnsw/src/database.d.ts +179 -177
- package/dist/src/rabitq-hnsw/src/database.js +359 -342
- package/dist/src/rabitq-hnsw/src/heap.d.ts +12 -12
- package/dist/src/rabitq-hnsw/src/heap.js +80 -75
- package/dist/src/rabitq-hnsw/src/hnsw.d.ts +103 -103
- package/dist/src/rabitq-hnsw/src/hnsw.js +454 -428
- package/dist/src/rabitq-hnsw/src/index.d.ts +6 -1
- package/dist/src/rabitq-hnsw/src/prng.d.ts +10 -10
- package/dist/src/rabitq-hnsw/src/prng.js +27 -25
- package/dist/src/rabitq-hnsw/src/rabitq.d.ts +69 -69
- package/dist/src/rabitq-hnsw/src/rabitq.js +262 -246
- package/dist/src/rabitq-hnsw/src/store.d.ts +132 -132
- package/dist/src/rabitq-hnsw/src/store.js +843 -752
- package/dist/src/rabitq-hnsw/test/hnsw.test.js +1054 -805
- package/dist/src/sema.d.ts +13 -9
- package/dist/src/sema.js +40 -26
- package/dist/src/store-sqlite.d.ts +166 -144
- package/dist/src/store-sqlite.js +660 -578
- package/dist/src/store.d.ts +630 -593
- package/dist/src/store.js +1581 -1440
- package/dist/src/vec.d.ts +9 -5
- package/dist/src/vec.js +73 -61
- package/package.json +2 -2
|
@@ -3,120 +3,124 @@
|
|
|
3
3
|
// and the optimal cover. Uses node:test; no dependency on sema.
|
|
4
4
|
import { test } from "node:test";
|
|
5
5
|
import assert from "node:assert/strict";
|
|
6
|
-
import { coverSequence, lightestDerivation, Trie
|
|
6
|
+
import { coverSequence, lightestDerivation, Trie } from "../src/index.js";
|
|
7
7
|
// ── trie: on-demand matching, no length bound ──────────────────────────────
|
|
8
8
|
test("trie matchesAt reports forms beginning exactly at a position", () => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const t = new Trie();
|
|
10
|
+
t.insert([1, 2], "ab");
|
|
11
|
+
t.insert([1, 2, 3], "abc");
|
|
12
|
+
t.insert([2, 3], "bc");
|
|
13
|
+
const at0 = t.matchesAt([1, 2, 3, 4], 0).map((m) => m.payload);
|
|
14
|
+
assert.deepEqual(at0, ["ab", "abc"]); // both forms starting at 0, shortest first
|
|
15
|
+
const at1 = t.matchesAt([1, 2, 3, 4], 1).map((m) => m.payload);
|
|
16
|
+
assert.deepEqual(at1, ["bc"]);
|
|
17
|
+
const at3 = t.matchesAt([1, 2, 3, 4], 3).map((m) => m.payload);
|
|
18
|
+
assert.deepEqual(at3, []); // nothing learned here → dead-ends immediately
|
|
19
19
|
});
|
|
20
20
|
test("trie scan finds every occurrence; duplicate inserts share an id", () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const t = new Trie();
|
|
22
|
+
const id1 = t.insert([7, 7], 1);
|
|
23
|
+
const id2 = t.insert([7, 7], 2); // same content
|
|
24
|
+
assert.equal(id1, id2);
|
|
25
|
+
assert.equal(t.size, 1);
|
|
26
|
+
const hits = t.scan([7, 7, 7]);
|
|
27
|
+
assert.equal(hits.length, 2); // [0,2) and [1,3)
|
|
28
28
|
});
|
|
29
29
|
// ── engine: Dijkstra/Knuth core with a bridge (multi-premise) rule ─────────
|
|
30
30
|
test("lightestDerivation solves a hypergraph with a bridge premise", () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
// Items: "A", "B", "AB". Axioms A (3) and B (4). A binary bridge A ∧ B → AB
|
|
32
|
+
// at cost 1. The only derivation of AB costs 3 + 4 + 1 = 8.
|
|
33
|
+
const A = "A", B = "B", AB = "AB";
|
|
34
|
+
const system = {
|
|
35
|
+
key: (s) => s,
|
|
36
|
+
axioms: () => [{ item: A, cost: 3 }, { item: B, cost: 4 }],
|
|
37
|
+
isGoal: (s) => s === AB,
|
|
38
|
+
*rules(item) {
|
|
39
|
+
// Bridge fires from either premise; the engine waits until both are known.
|
|
40
|
+
if (item === A) {
|
|
41
|
+
yield { premises: [A, B], conclusion: AB, cost: 1 };
|
|
42
|
+
}
|
|
43
|
+
if (item === B) {
|
|
44
|
+
yield { premises: [A, B], conclusion: AB, cost: 1 };
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const d = lightestDerivation(system);
|
|
49
|
+
assert.ok(d);
|
|
50
|
+
assert.equal(d.item, AB);
|
|
51
|
+
assert.equal(d.cost, 8);
|
|
52
|
+
assert.equal(d.premises.length, 2); // it really used the bridge
|
|
51
53
|
});
|
|
52
54
|
test("lightestDerivation picks the cheaper of competing derivations", () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
// Two ways to reach the goal G from axiom S: S→G cost 10, or S→M→G cost 3+3.
|
|
56
|
+
const system = {
|
|
57
|
+
key: (s) => s,
|
|
58
|
+
axioms: () => [{ item: "S", cost: 0 }],
|
|
59
|
+
isGoal: (s) => s === "G",
|
|
60
|
+
*rules(item) {
|
|
61
|
+
if (item === "S") {
|
|
62
|
+
yield { premises: ["S"], conclusion: "G", cost: 10 };
|
|
63
|
+
yield { premises: ["S"], conclusion: "M", cost: 3 };
|
|
64
|
+
}
|
|
65
|
+
if (item === "M") {
|
|
66
|
+
yield { premises: ["M"], conclusion: "G", cost: 3 };
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
const d = lightestDerivation(system);
|
|
71
|
+
assert.ok(d);
|
|
72
|
+
assert.equal(d.cost, 6); // via M, not the direct 10
|
|
73
|
+
assert.equal(d.rule?.premises[0], "M");
|
|
71
74
|
});
|
|
72
75
|
test("lightestDerivation returns null when the goal is unreachable", () => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
76
|
+
const system = {
|
|
77
|
+
key: (n) => "" + n,
|
|
78
|
+
axioms: () => [{ item: 0, cost: 0 }],
|
|
79
|
+
isGoal: (n) => n === 99,
|
|
80
|
+
*rules(n) {
|
|
81
|
+
if (n < 3) {
|
|
82
|
+
yield { premises: [n], conclusion: n + 1, cost: 1 };
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
assert.equal(lightestDerivation(system), null);
|
|
83
87
|
});
|
|
84
88
|
// ── cover: optimal, not greedy ─────────────────────────────────────────────
|
|
85
89
|
test("coverSequence maximises coverage, beating greedy longest-match", () => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
// Over [0,4): one long span [1,4) (len 3) vs two short [0,2),[2,4) (cover 4).
|
|
91
|
+
// Greedy-longest takes [1,4) and covers 3; the optimal cover takes the pair.
|
|
92
|
+
const cover = coverSequence(4, [
|
|
93
|
+
{ start: 1, end: 4, payload: "long" },
|
|
94
|
+
{ start: 0, end: 2, payload: "left" },
|
|
95
|
+
{ start: 2, end: 4, payload: "right" },
|
|
96
|
+
]);
|
|
97
|
+
assert.equal(cover.covered, 4);
|
|
98
|
+
assert.equal(cover.uncovered, 0);
|
|
99
|
+
assert.deepEqual(cover.spans.map((s) => s.payload), ["left", "right"]);
|
|
96
100
|
});
|
|
97
101
|
test("coverSequence prefers fewer, longer spans on ties (unit weight)", () => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
// [0,3) covers the same as [0,1)+[1,3) but in one span → preferred.
|
|
103
|
+
const cover = coverSequence(3, [
|
|
104
|
+
{ start: 0, end: 3, payload: "whole" },
|
|
105
|
+
{ start: 0, end: 1, payload: "a" },
|
|
106
|
+
{ start: 1, end: 3, payload: "b" },
|
|
107
|
+
]);
|
|
108
|
+
assert.deepEqual(cover.spans.map((s) => s.payload), ["whole"]);
|
|
105
109
|
});
|
|
106
110
|
test("coverSequence leaves genuinely uncovered gaps uncovered", () => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
const cover = coverSequence(10, [
|
|
112
|
+
{ start: 0, end: 3, payload: "x" },
|
|
113
|
+
{ start: 6, end: 9, payload: "y" },
|
|
114
|
+
]);
|
|
115
|
+
assert.equal(cover.covered, 6);
|
|
116
|
+
assert.equal(cover.uncovered, 4);
|
|
117
|
+
assert.deepEqual(cover.spans.map((s) => s.payload), ["x", "y"]);
|
|
114
118
|
});
|
|
115
119
|
test("coverSequence honours weights when coverage ties", () => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
// Both single-span covers cover all 2 symbols; the lighter weight wins.
|
|
121
|
+
const cover = coverSequence(2, [
|
|
122
|
+
{ start: 0, end: 2, weight: 5, payload: "heavy" },
|
|
123
|
+
{ start: 0, end: 2, weight: 1, payload: "light" },
|
|
124
|
+
]);
|
|
125
|
+
assert.deepEqual(cover.spans.map((s) => s.payload), ["light"]);
|
|
122
126
|
});
|
package/dist/src/extension.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** A half-open byte span of a query an extension computed, and the canonical
|
|
2
2
|
* result bytes it is authoritative for. */
|
|
3
3
|
export interface ComputedSpan {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
i: number;
|
|
5
|
+
j: number;
|
|
6
|
+
bytes: Uint8Array;
|
|
7
7
|
}
|
|
8
8
|
/** The generic capabilities the mind lends every extension — nothing here
|
|
9
9
|
* names any particular extension, and every member is machinery the mind
|
|
@@ -24,14 +24,17 @@ export interface ComputedSpan {
|
|
|
24
24
|
* • reach — the river's grouping capacity (maxGroup), bounding how far apart
|
|
25
25
|
* two spans may sit and still be read as one construction. */
|
|
26
26
|
export interface ExtensionHost {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
meaningOf(
|
|
28
|
+
bytes: Uint8Array,
|
|
29
|
+
anchors: ReadonlyArray<{
|
|
30
|
+
name: string;
|
|
31
|
+
form: Uint8Array;
|
|
32
|
+
}>,
|
|
33
|
+
): Promise<string | null>;
|
|
34
|
+
continuation(bytes: Uint8Array): Promise<Uint8Array | null>;
|
|
35
|
+
segment(bytes: Uint8Array): Array<{
|
|
36
|
+
i: number;
|
|
37
|
+
j: number;
|
|
38
|
+
}>;
|
|
39
|
+
reach: number;
|
|
37
40
|
}
|
package/dist/src/geometry.d.ts
CHANGED
|
@@ -21,7 +21,11 @@ export declare function mergeThreshold(D: number): number;
|
|
|
21
21
|
* fraction, the span's MAGNITUDE (√len, the linear fold's own norm) converts
|
|
22
22
|
* the tolerated fraction into tolerated bytes. Derived from W, D and the
|
|
23
23
|
* span; never tuned. */
|
|
24
|
-
export declare function identityBar(
|
|
24
|
+
export declare function identityBar(
|
|
25
|
+
D: number,
|
|
26
|
+
maxGroup: number,
|
|
27
|
+
len: number,
|
|
28
|
+
): number;
|
|
25
29
|
/** The reach bar: half a river quantum, derived from the fold's own geometry.
|
|
26
30
|
* A branch folds up to `maxGroup` children, so two forms that differ in ONE
|
|
27
31
|
* whole child — the smallest distinction perception can mean — sit at cosine
|
|
@@ -91,20 +95,30 @@ export declare function consensusFloor(N: number): number;
|
|
|
91
95
|
* structurally-isolated entries. Derived, never tuned. */
|
|
92
96
|
export declare function coverageBar(_maxGroup: number, D: number): number;
|
|
93
97
|
export interface Grid {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
width: number;
|
|
99
|
+
height: number;
|
|
100
|
+
channels: number;
|
|
101
|
+
data: Uint8Array;
|
|
102
|
+
dims?: number[];
|
|
99
103
|
}
|
|
100
104
|
/** Find the longest prefix of `bytes` whose leaf-id signature matches a
|
|
101
105
|
* known branch via `lookup`. Returns the byte-length of that prefix, or 0. */
|
|
102
|
-
export declare function knownPrefixLength(
|
|
106
|
+
export declare function knownPrefixLength(
|
|
107
|
+
bytes: Uint8Array,
|
|
108
|
+
leafAt: (i: number) => number | null,
|
|
109
|
+
lookup: (leafIds: number[]) => number | null,
|
|
110
|
+
): number;
|
|
103
111
|
/** Bytes → Sema tree. `leafAt` and `lookup` are store capabilities for
|
|
104
112
|
* detecting previously-stored prefixes so the river can split at the
|
|
105
113
|
* correct boundary. Pass them through from `perceive`; the geometry
|
|
106
114
|
* computes the stable prefix internally. */
|
|
107
|
-
export declare function bytesToTree(
|
|
115
|
+
export declare function bytesToTree(
|
|
116
|
+
space: Space,
|
|
117
|
+
alphabet: Alphabet,
|
|
118
|
+
bytes: Uint8Array,
|
|
119
|
+
leafAt?: (i: number) => number | null,
|
|
120
|
+
lookup?: (leafIds: number[]) => number | null,
|
|
121
|
+
): Sema;
|
|
108
122
|
/** The PLAIN fold's full level pyramid — every level's item list, bottom
|
|
109
123
|
* (leaves) to top (root). Left-grouped folding is RADIX-ALIGNED: the item
|
|
110
124
|
* at level L, index i, covers exactly bytes [i·mg^L, (i+1)·mg^L) whenever
|
|
@@ -118,20 +132,31 @@ export declare function bytesToTree(space: Space, alphabet: Alphabet, bytes: Uin
|
|
|
118
132
|
* never mutated). Purely an implementation cache: structure and numerics
|
|
119
133
|
* never depend on whether a pyramid was available. */
|
|
120
134
|
export interface FoldPyramid {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
135
|
+
levels: Array<
|
|
136
|
+
Array<{
|
|
137
|
+
tree: Sema;
|
|
138
|
+
len: number;
|
|
139
|
+
}>
|
|
140
|
+
>;
|
|
141
|
+
bytes: number;
|
|
126
142
|
}
|
|
127
143
|
/** Plain bytes→tree (identical to capability-less {@link bytesToTree}) that
|
|
128
144
|
* also RETURNS its pyramid, reusing `prev` — the pyramid of a PROPER
|
|
129
145
|
* prefix of `bytes` (caller guarantees content match and
|
|
130
146
|
* prev.bytes < bytes.length). */
|
|
131
|
-
export declare function bytesToTreePyramid(
|
|
132
|
-
|
|
133
|
-
|
|
147
|
+
export declare function bytesToTreePyramid(
|
|
148
|
+
space: Space,
|
|
149
|
+
alphabet: Alphabet,
|
|
150
|
+
bytes: Uint8Array,
|
|
151
|
+
prev?: FoldPyramid,
|
|
152
|
+
): {
|
|
153
|
+
tree: Sema;
|
|
154
|
+
pyramid: FoldPyramid;
|
|
134
155
|
};
|
|
135
156
|
export declare function hilbertBytes(grid: Grid): Uint8Array;
|
|
136
|
-
export declare function gridToTree(
|
|
157
|
+
export declare function gridToTree(
|
|
158
|
+
space: Space,
|
|
159
|
+
alphabet: Alphabet,
|
|
160
|
+
grid: Grid,
|
|
161
|
+
): Sema;
|
|
137
162
|
export declare function stackGrids(frames: Grid[]): Grid;
|