dress-graph 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/README.md +7 -16
- package/dress.js +5 -3
- package/package.json +1 -1
- package/dress_wasm.wasm +0 -0
package/README.md
CHANGED
|
@@ -2,28 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
**A Continuous Framework for Structural Graph Refinement**
|
|
4
4
|
|
|
5
|
-
DRESS is a
|
|
6
|
-
At depth k, higher-order DRESS is **provably at least as powerful as (k+2)-WL**
|
|
7
|
-
in expressiveness — the base algorithm (k=0) already matches 2-WL, and each
|
|
8
|
-
level adds one WL dimension.
|
|
9
|
-
Yet it is dramatically cheaper to compute: a single DRESS run costs
|
|
10
|
-
O(I · m · d_max) where I is the number of iterations, and depth-k requires
|
|
11
|
-
C(n,k) independent runs — a total of O(C(n,k) · I · m · d_max), compared to
|
|
12
|
-
O(n^(k+3)) for (k+2)-WL. Space complexity is O(n + m), compared to
|
|
13
|
-
O(n^(k+2)) for (k+2)-WL.
|
|
14
|
-
The algorithm is embarrassingly parallel in two orthogonal ways — across the
|
|
15
|
-
C(n,k) subproblems and across edge updates within each iteration — enabling
|
|
16
|
-
distributed/cloud and multi-core/GPU/SIMD implementations.
|
|
5
|
+
DRESS is a deterministic, parameter-free framework that iteratively refines the structural similarity of edges in a graph to produce a canonical fingerprint: a real-valued edge vector, obtained by converging a non-linear dynamical system to its unique fixed point. The fingerprint is isomorphism-invariant by construction, numerically stable (no overflow, no error amplification, no undefined behavior), fast and embarrassingly parallel to compute: DRESS total runtime is O(I * m * d_max) for I iterations to convergence, and convergence is guaranteed by Birkhoff contraction.
|
|
17
6
|
|
|
18
7
|
## Quick start
|
|
19
8
|
|
|
20
9
|
```javascript
|
|
21
|
-
|
|
10
|
+
import { dressFit } from 'dress-graph';
|
|
22
11
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
const result = await dressFit({
|
|
13
|
+
numVertices: 4,
|
|
14
|
+
sources: [0, 1, 2, 0],
|
|
15
|
+
targets: [1, 2, 3, 3],
|
|
26
16
|
});
|
|
17
|
+
console.log(result.edgeDress);
|
|
27
18
|
```
|
|
28
19
|
|
|
29
20
|
For the full API and documentation, see the [main repository](https://github.com/velicast/dress-graph).
|
package/dress.js
CHANGED
|
@@ -402,6 +402,8 @@ export async function deltaDressFit(opts) {
|
|
|
402
402
|
const epsilon = opts.epsilon ?? 1e-6;
|
|
403
403
|
const precompute = (opts.precompute ?? false) ? 1 : 0;
|
|
404
404
|
const keepMS = (opts.keepMultisets ?? false) ? 1 : 0;
|
|
405
|
+
const offset = opts.offset ?? 0;
|
|
406
|
+
const stride = opts.stride ?? 1;
|
|
405
407
|
|
|
406
408
|
// Allocate C arrays (ownership transfers to init_dress_graph)
|
|
407
409
|
const uPtr = M._malloc(E * 4);
|
|
@@ -444,9 +446,9 @@ export async function deltaDressFit(opts) {
|
|
|
444
446
|
M.setValue(numSubPtr + 4, 0, 'i32');
|
|
445
447
|
}
|
|
446
448
|
|
|
447
|
-
// Call
|
|
448
|
-
const histPtr = M.
|
|
449
|
-
keepMS, msPtrPtr, numSubPtr);
|
|
449
|
+
// Call delta_dress_fit_strided (returns int64_t* — pointer to histogram on heap)
|
|
450
|
+
const histPtr = M._delta_dress_fit_strided(g, k, maxIter, epsilon, histSizePtr,
|
|
451
|
+
keepMS, msPtrPtr, numSubPtr, offset, stride);
|
|
450
452
|
|
|
451
453
|
const histSize = M.getValue(histSizePtr, 'i32');
|
|
452
454
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dress-graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "DRESS is a deterministic, parameter-free framework that iteratively refines the structural similarity of edges in a graph to produce a canonical fingerprint: a real-valued edge vector, obtained by converging a non-linear dynamical system to its unique fixed point. The fingerprint is isomorphism-invariant by construction, numerically stable (no overflow, no error amplification, no undefined behavior), fast and embarrassingly parallel to compute: DRESS total runtime is O(I * m * d_max) for I iterations to convergence, and convergence is guaranteed by Birkhoff contraction.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dress.js",
|
package/dress_wasm.wasm
DELETED
|
Binary file
|