@graphty/webgpu-graph-algorithms 0.4.0 → 0.5.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/dist/src/accelerator.d.ts +5 -4
- package/dist/src/accelerator.d.ts.map +1 -1
- package/dist/src/accelerator.js +5 -4
- package/dist/src/accelerator.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/accelerator.d.ts +7 -154
- package/dist/src/types/accelerator.d.ts.map +1 -1
- package/dist/src/types/accelerator.js +4 -5
- package/dist/src/types/accelerator.js.map +1 -1
- package/dist/src/types/algorithms.d.ts +1 -1
- package/dist/src/types/algorithms.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/webgpu-graph-algorithms.js.map +1 -1
- package/package.json +4 -3
- package/src/accelerator.ts +5 -4
- package/src/index.ts +4 -3
- package/src/types/accelerator.ts +43 -171
- package/src/types/algorithms.ts +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* createAccelerator (spec 3.3, 9; contract 3.14): the injectable object that satisfies the CPU packages'
|
|
3
|
-
* AlgorithmAccelerator and LayoutAccelerator interfaces (spec 9.2, 9.3
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `forceAtlas2`, `release` and `dispose`
|
|
3
|
+
* AlgorithmAccelerator and LayoutAccelerator interfaces (spec 9.2, 9.3). Both are the REAL declarations,
|
|
4
|
+
* `LayoutAccelerator` from `@graphty/layout` (W1b, layout half) and `AlgorithmAccelerator` from
|
|
5
|
+
* `@graphty/algorithms` (W1b, algorithms half), `import type`d by src/types/accelerator.ts, so the object built
|
|
6
|
+
* here is checked against the CPU packages' own contracts. It carries P3's `forceAtlas2`, `release` and `dispose`
|
|
7
|
+
* and P7's seven
|
|
7
8
|
* algorithm members (spec 8.2, 8.3; M8b-T8, PD-14) and nothing else: the CPU-side dispatchers (`accelerated()`,
|
|
8
9
|
* `createSimulation()`) test `acc.betweennessCentrality !== undefined` and route to the CPU when the member is
|
|
9
10
|
* absent (spec 2.4 row "method missing"), so a method the GPU does not implement must not exist here -- never a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accelerator.d.ts","sourceRoot":"","sources":["../../src/accelerator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"accelerator.d.ts","sourceRoot":"","sources":["../../src/accelerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsEtF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,cAAc,CA2G/F"}
|
package/dist/src/accelerator.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* createAccelerator (spec 3.3, 9; contract 3.14): the injectable object that satisfies the CPU packages'
|
|
3
|
-
* AlgorithmAccelerator and LayoutAccelerator interfaces (spec 9.2, 9.3
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `forceAtlas2`, `release` and `dispose`
|
|
3
|
+
* AlgorithmAccelerator and LayoutAccelerator interfaces (spec 9.2, 9.3). Both are the REAL declarations,
|
|
4
|
+
* `LayoutAccelerator` from `@graphty/layout` (W1b, layout half) and `AlgorithmAccelerator` from
|
|
5
|
+
* `@graphty/algorithms` (W1b, algorithms half), `import type`d by src/types/accelerator.ts, so the object built
|
|
6
|
+
* here is checked against the CPU packages' own contracts. It carries P3's `forceAtlas2`, `release` and `dispose`
|
|
7
|
+
* and P7's seven
|
|
7
8
|
* algorithm members (spec 8.2, 8.3; M8b-T8, PD-14) and nothing else: the CPU-side dispatchers (`accelerated()`,
|
|
8
9
|
* `createSimulation()`) test `acc.betweennessCentrality !== undefined` and route to the CPU when the member is
|
|
9
10
|
* absent (spec 2.4 row "method missing"), so a method the GPU does not implement must not exist here -- never a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accelerator.js","sourceRoot":"","sources":["../../src/accelerator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"accelerator.js","sourceRoot":"","sources":["../../src/accelerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAsB7D;;;;;GAKG;AACH,SAAS,eAAe,CAAC,QAA6B;IAClD,MAAM,IAAI,GAAwE,EAAE,GAAG,QAAQ,EAAE,CAAC;IAClG,IAAI,QAAQ,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,UAA6B;IACjD,MAAM,IAAI,GAAsD,EAAE,GAAG,UAAU,EAAE,CAAC;IAClF,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;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AAC,CAAC;QACjD,CAAC;QACD;;;WAGG;QACH,OAAO,CAAC,CAAgB;YACpB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QACD;;WAEG;QACH,OAAO;YACH,GAAG,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { eigenvectorCentrality, hits, katzCentrality } from "./algorithms/spectr
|
|
|
24
24
|
export { createAccelerator } from "./accelerator.js";
|
|
25
25
|
export { createForceAtlas2 } from "./layouts/forceatlas2.js";
|
|
26
26
|
export { seedPositions } from "./layouts/seed.js";
|
|
27
|
-
export type { AcceleratorOptions, AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BfsResultLike, CommunityResultLike, CorenessResultLike,
|
|
27
|
+
export type { AcceleratorOptions, AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BetweennessAcceleratorOptions, BfsResultLike, CommunityResultLike, CorenessResultLike, EdgeScoresResultLike, GpuAccelerator, HitsOptionsLike, HitsResultLike, LabelResultLike, LayoutAccelerator, LayoutSimulation, MstResultLike, PageRankResultLike, ScoresResultLike, SsspResultLike, } from "./types/accelerator.js";
|
|
28
28
|
export type { ComponentsOptions, EigenvectorOptions, GpuHitsResult, GpuLabelResult, GpuPageRankResult, GpuScoresResult, HitsOptions, KatzOptions, PageRankOptions, } from "./types/algorithms.js";
|
|
29
29
|
export type { AdapterInfoLike, AdapterSummary, GpuCaps, GpuContextOptions, LimitPolicy, PlanCaps, PlanLimits, ProbeOptions, ProbeResult, RaisableLimit, } from "./types/context.js";
|
|
30
30
|
export type { ForceAtlas2Stats, ForceAtlas2TraceRecord, GpuLayoutSimulation, GpuLayoutTuning, LayoutStatsBase, RunOptions, } from "./types/layout.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;;AAGH,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,oBAAoB,GAC5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,YAAY,EACR,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;;AAGH,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB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W,EACX,aAAa,GAChB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACR,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,GACb,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACR,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,165 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The layout half of spec 9.3 and the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* test/types/conformance.test-d.ts is the cross-compile that holds the layout half honest. Types only.
|
|
2
|
+
* The layout half of spec 9.3 and the algorithms half of spec 9.2, plus the package's own accelerator surface
|
|
3
|
+
* (spec 3.3). D27's mirrors are gone: both halves are now `import type` of the real packages, re-exported here so
|
|
4
|
+
* this package's public surface is unchanged; `test/types/conformance.test-d.ts` is the cross-compile that holds
|
|
5
|
+
* them honest. Types only.
|
|
7
6
|
*/
|
|
8
|
-
import type {
|
|
7
|
+
import type { AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BetweennessAcceleratorOptions, BfsResultLike, CommunityResultLike, CorenessResultLike, EdgeScoresResultLike, HitsOptionsLike, HitsResultLike, LabelResultLike, MstResultLike, PageRankResultLike, ScoresResultLike, SsspResultLike } from "@graphty/algorithms";
|
|
8
|
+
import type { F32, F64, GraphSnapshot } from "@graphty/graph-format";
|
|
9
9
|
import type { LayoutAccelerator, LayoutSimulation } from "@graphty/layout";
|
|
10
10
|
import type { GpuContext } from "../context.js";
|
|
11
11
|
import type { ComponentsOptions, EigenvectorOptions, GpuHitsResult, GpuLabelResult, GpuPageRankResult, GpuScoresResult, HitsOptions, KatzOptions, PageRankOptions } from "./algorithms.js";
|
|
12
12
|
import type { ForceAtlas2Stats, GpuLayoutSimulation, GpuLayoutTuning } from "./layout.js";
|
|
13
13
|
import type { ForceAtlas2Options } from "./options.js";
|
|
14
14
|
export type { LayoutAccelerator, LayoutSimulation };
|
|
15
|
-
|
|
16
|
-
* Placeholder for the CPU option types the AlgorithmAccelerator methods take before A2 lands (spec 9.2: "the
|
|
17
|
-
* accelerator methods reuse the indexed.* option types").
|
|
18
|
-
* Exported: published mirror (spec 9.2); re-exported from src/index.ts at P3-T3.
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export type CpuAlgorithmOptions = Readonly<Record<string, unknown>>;
|
|
22
|
-
/**
|
|
23
|
-
* Score-shaped result of the CPU package (spec 9.7).
|
|
24
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export interface ScoresResultLike {
|
|
28
|
-
readonly scores: NumericVector;
|
|
29
|
-
readonly iterations: number;
|
|
30
|
-
readonly converged: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* PageRank result mirror.
|
|
34
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
37
|
-
export interface PageRankResultLike extends ScoresResultLike {
|
|
38
|
-
readonly danglingMass?: number | undefined;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* HITS result mirror.
|
|
42
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export interface HitsResultLike {
|
|
46
|
-
readonly hubs: NumericVector;
|
|
47
|
-
readonly authorities: NumericVector;
|
|
48
|
-
readonly iterations: number;
|
|
49
|
-
readonly converged: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Label result mirror (components, label propagation).
|
|
53
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
54
|
-
* @public
|
|
55
|
-
*/
|
|
56
|
-
export interface LabelResultLike {
|
|
57
|
-
readonly labels: U32;
|
|
58
|
-
readonly count: number;
|
|
59
|
-
groups(): U32[];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* BFS result mirror.
|
|
63
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
64
|
-
* @public
|
|
65
|
-
*/
|
|
66
|
-
export interface BfsResultLike {
|
|
67
|
-
readonly depth: U32;
|
|
68
|
-
readonly parent: U32;
|
|
69
|
-
readonly order: U32;
|
|
70
|
-
readonly visitedCount: number;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* SSSP result mirror.
|
|
74
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export interface SsspResultLike {
|
|
78
|
-
readonly dist: NumericVector;
|
|
79
|
-
readonly predArc: U32;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Bellman-Ford result mirror.
|
|
83
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
84
|
-
* @public
|
|
85
|
-
*/
|
|
86
|
-
export interface BellmanFordResultLike extends SsspResultLike {
|
|
87
|
-
readonly hasNegativeCycle: boolean;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Edge-score result mirror.
|
|
91
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
94
|
-
export interface EdgeScoresResultLike {
|
|
95
|
-
readonly scores: NumericVector;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* APSP result mirror.
|
|
99
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
|
-
export interface ApspResultLike {
|
|
103
|
-
readonly dist: NumericVector;
|
|
104
|
-
readonly n: number;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* k-core result mirror.
|
|
108
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
109
|
-
* @public
|
|
110
|
-
*/
|
|
111
|
-
export interface CorenessResultLike {
|
|
112
|
-
readonly coreness: U32;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Minimum-spanning-tree result mirror.
|
|
116
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
117
|
-
* @public
|
|
118
|
-
*/
|
|
119
|
-
export interface MstResultLike {
|
|
120
|
-
readonly edges: U32;
|
|
121
|
-
readonly totalWeight: number;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Community result mirror (Louvain).
|
|
125
|
-
* Exported: published mirror; re-exported from src/index.ts at P3-T3.
|
|
126
|
-
* @public
|
|
127
|
-
*/
|
|
128
|
-
export interface CommunityResultLike extends LabelResultLike {
|
|
129
|
-
readonly modularity: number;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Spec 9.2 AlgorithmAccelerator, verbatim (every member optional; option types are CpuAlgorithmOptions until A2).
|
|
133
|
-
* Exported: published mirror (spec 9.2, D27); re-exported from src/index.ts at P3-T3.
|
|
134
|
-
* @public
|
|
135
|
-
*/
|
|
136
|
-
export interface AlgorithmAccelerator {
|
|
137
|
-
readonly kind: string;
|
|
138
|
-
pageRank?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<PageRankResultLike>;
|
|
139
|
-
personalizedPageRank?(s: GraphSnapshot, personalization: F32 | F64, options?: CpuAlgorithmOptions): Promise<PageRankResultLike>;
|
|
140
|
-
hits?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<HitsResultLike>;
|
|
141
|
-
eigenvectorCentrality?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<ScoresResultLike>;
|
|
142
|
-
katzCentrality?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<ScoresResultLike>;
|
|
143
|
-
connectedComponents?(s: GraphSnapshot): Promise<LabelResultLike>;
|
|
144
|
-
weaklyConnectedComponents?(s: GraphSnapshot): Promise<LabelResultLike>;
|
|
145
|
-
breadthFirstSearch?(s: GraphSnapshot, source: number, options?: CpuAlgorithmOptions): Promise<BfsResultLike>;
|
|
146
|
-
sssp?(s: GraphSnapshot, source: number, options?: CpuAlgorithmOptions): Promise<SsspResultLike>;
|
|
147
|
-
bellmanFord?(s: GraphSnapshot, source: number, options?: CpuAlgorithmOptions): Promise<BellmanFordResultLike>;
|
|
148
|
-
closenessCentrality?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<ScoresResultLike>;
|
|
149
|
-
betweennessCentrality?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<ScoresResultLike>;
|
|
150
|
-
edgeBetweennessCentrality?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<EdgeScoresResultLike>;
|
|
151
|
-
allPairsShortestPath?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<ApspResultLike>;
|
|
152
|
-
kCoreDecomposition?(s: GraphSnapshot): Promise<CorenessResultLike>;
|
|
153
|
-
triangleCount?(s: GraphSnapshot): Promise<{
|
|
154
|
-
readonly perNode: U32;
|
|
155
|
-
readonly total: number;
|
|
156
|
-
}>;
|
|
157
|
-
labelPropagation?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<LabelResultLike>;
|
|
158
|
-
minimumSpanningTree?(s: GraphSnapshot): Promise<MstResultLike>;
|
|
159
|
-
louvain?(s: GraphSnapshot, options?: CpuAlgorithmOptions): Promise<CommunityResultLike>;
|
|
160
|
-
release?(s: GraphSnapshot): void;
|
|
161
|
-
dispose?(): void;
|
|
162
|
-
}
|
|
15
|
+
export type { AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BetweennessAcceleratorOptions, BfsResultLike, CommunityResultLike, CorenessResultLike, EdgeScoresResultLike, HitsOptionsLike, HitsResultLike, LabelResultLike, MstResultLike, PageRankResultLike, ScoresResultLike, SsspResultLike, };
|
|
163
16
|
/**
|
|
164
17
|
* Spec 3.3 AcceleratorOptions, verbatim.
|
|
165
18
|
* Exported: consumed by src/accelerator.ts (P3-T3); re-exported from src/index.ts at P3-T3.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accelerator.d.ts","sourceRoot":"","sources":["../../../src/types/accelerator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"accelerator.d.ts","sourceRoot":"","sources":["../../../src/types/accelerator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACR,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,6BAA6B,EAC7B,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACR,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMvD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAMpD,YAAY,EACR,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,6BAA6B,EAC7B,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,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;IAChG,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAClF,mBAAmB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5F,yBAAyB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAClG,OAAO,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,OAAO,IAAI,IAAI,CAAC;CACnB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The layout half of spec 9.3 and the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* test/types/conformance.test-d.ts is the cross-compile that holds the layout half honest. Types only.
|
|
2
|
+
* The layout half of spec 9.3 and the algorithms half of spec 9.2, plus the package's own accelerator surface
|
|
3
|
+
* (spec 3.3). D27's mirrors are gone: both halves are now `import type` of the real packages, re-exported here so
|
|
4
|
+
* this package's public surface is unchanged; `test/types/conformance.test-d.ts` is the cross-compile that holds
|
|
5
|
+
* them honest. Types only.
|
|
7
6
|
*/
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=accelerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accelerator.js","sourceRoot":"","sources":["../../../src/types/accelerator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"accelerator.js","sourceRoot":"","sources":["../../../src/types/accelerator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* layout options until W1b, when those became `import type` re-exports of `@graphty/layout`'s declarations).
|
|
6
6
|
* Types only: this file imports nothing at runtime.
|
|
7
7
|
*
|
|
8
|
-
* The CPU counterparts,
|
|
8
|
+
* The CPU counterparts, in `@graphty/algorithms`' `indexed/accelerator.ts` since the seam landed:
|
|
9
9
|
* `PageRankOptions` here is `IndexedPageRankOptions` there (`{ dampingFactor?, maxIterations?, tolerance?,
|
|
10
10
|
* weighted? }`); `HitsOptions`, `EigenvectorOptions` and `KatzOptions` here all correspond to the ONE
|
|
11
11
|
* `HitsOptionsLike` there (`{ maxIterations?, tolerance?, weighted? }`), which is why every one of them carries
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* layout options until W1b, when those became `import type` re-exports of `@graphty/layout`'s declarations).
|
|
6
6
|
* Types only: this file imports nothing at runtime.
|
|
7
7
|
*
|
|
8
|
-
* The CPU counterparts,
|
|
8
|
+
* The CPU counterparts, in `@graphty/algorithms`' `indexed/accelerator.ts` since the seam landed:
|
|
9
9
|
* `PageRankOptions` here is `IndexedPageRankOptions` there (`{ dampingFactor?, maxIterations?, tolerance?,
|
|
10
10
|
* weighted? }`); `HitsOptions`, `EigenvectorOptions` and `KatzOptions` here all correspond to the ONE
|
|
11
11
|
* `HitsOptionsLike` there (`{ maxIterations?, tolerance?, weighted? }`), which is why every one of them carries
|