graphwise 1.12.0 → 1.12.1
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 +16 -16
- package/dist/__test__/fixtures/graphs/linear-chain.d.ts +3 -3
- package/dist/__test__/fixtures/helpers.d.ts +12 -12
- package/dist/__test__/fixtures/helpers.d.ts.map +1 -1
- package/dist/__test__/fixtures/index.d.ts +1 -1
- package/dist/__test__/fixtures/metrics.d.ts +10 -10
- package/dist/__test__/fixtures/metrics.d.ts.map +1 -1
- package/dist/__test__/fixtures/types.d.ts +2 -2
- package/dist/__test__/fixtures/types.d.ts.map +1 -1
- package/dist/async/protocol.d.ts +1 -1
- package/dist/async/protocol.d.ts.map +1 -1
- package/dist/{expansion → exploration}/base-core.d.ts +5 -5
- package/dist/exploration/base-core.d.ts.map +1 -0
- package/dist/exploration/base-core.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/base-helpers.d.ts +11 -11
- package/dist/exploration/base-helpers.d.ts.map +1 -0
- package/dist/{expansion → exploration}/base.d.ts +11 -11
- package/dist/exploration/base.d.ts.map +1 -0
- package/dist/exploration/base.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/comparison.integration.test.d.ts +2 -2
- package/dist/exploration/comparison.integration.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/dfs-priority.d.ts +8 -8
- package/dist/exploration/dfs-priority.d.ts.map +1 -0
- package/dist/exploration/dfs-priority.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/dome.d.ts +13 -13
- package/dist/exploration/dome.d.ts.map +1 -0
- package/dist/{expansion → exploration}/dome.integration.test.d.ts +2 -2
- package/dist/exploration/dome.integration.test.d.ts.map +1 -0
- package/dist/exploration/dome.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/edge.d.ts +8 -8
- package/dist/exploration/edge.d.ts.map +1 -0
- package/dist/{expansion → exploration}/edge.integration.test.d.ts +1 -1
- package/dist/exploration/edge.integration.test.d.ts.map +1 -0
- package/dist/exploration/edge.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/flux.d.ts +11 -11
- package/dist/exploration/flux.d.ts.map +1 -0
- package/dist/{expansion → exploration}/flux.integration.test.d.ts +1 -1
- package/dist/exploration/flux.integration.test.d.ts.map +1 -0
- package/dist/exploration/flux.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/frontier-balanced.d.ts +8 -8
- package/dist/exploration/frontier-balanced.d.ts.map +1 -0
- package/dist/exploration/frontier-balanced.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/fuse.d.ts +10 -10
- package/dist/exploration/fuse.d.ts.map +1 -0
- package/dist/{expansion → exploration}/fuse.integration.test.d.ts +1 -1
- package/dist/exploration/fuse.integration.test.d.ts.map +1 -0
- package/dist/exploration/fuse.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/hae.d.ts +10 -10
- package/dist/exploration/hae.d.ts.map +1 -0
- package/dist/{expansion → exploration}/hae.integration.test.d.ts +2 -2
- package/dist/exploration/hae.integration.test.d.ts.map +1 -0
- package/dist/exploration/hae.unit.test.d.ts.map +1 -0
- package/dist/exploration/index.cjs +51 -0
- package/dist/{expansion → exploration}/index.d.ts +3 -3
- package/dist/exploration/index.d.ts.map +1 -0
- package/dist/{expansion → exploration}/index.js +1 -1
- package/dist/{expansion → exploration}/k-hop.d.ts +6 -6
- package/dist/exploration/k-hop.d.ts.map +1 -0
- package/dist/exploration/k-hop.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/lace.d.ts +11 -11
- package/dist/exploration/lace.d.ts.map +1 -0
- package/dist/{expansion → exploration}/lace.integration.test.d.ts +1 -1
- package/dist/exploration/lace.integration.test.d.ts.map +1 -0
- package/dist/exploration/lace.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/maze.d.ts +9 -9
- package/dist/exploration/maze.d.ts.map +1 -0
- package/dist/{expansion → exploration}/maze.integration.test.d.ts +1 -1
- package/dist/exploration/maze.integration.test.d.ts.map +1 -0
- package/dist/exploration/maze.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/pipe.d.ts +8 -8
- package/dist/exploration/pipe.d.ts.map +1 -0
- package/dist/{expansion → exploration}/pipe.integration.test.d.ts +2 -2
- package/dist/exploration/pipe.integration.test.d.ts.map +1 -0
- package/dist/exploration/pipe.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/priority-helpers.d.ts +2 -2
- package/dist/exploration/priority-helpers.d.ts.map +1 -0
- package/dist/{expansion → exploration}/random-priority.d.ts +11 -11
- package/dist/exploration/random-priority.d.ts.map +1 -0
- package/dist/exploration/random-priority.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/random-walk.d.ts +6 -6
- package/dist/exploration/random-walk.d.ts.map +1 -0
- package/dist/exploration/random-walk.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/reach.d.ts +9 -9
- package/dist/exploration/reach.d.ts.map +1 -0
- package/dist/{expansion → exploration}/reach.integration.test.d.ts +1 -1
- package/dist/exploration/reach.integration.test.d.ts.map +1 -0
- package/dist/exploration/reach.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/sage.d.ts +9 -9
- package/dist/exploration/sage.d.ts.map +1 -0
- package/dist/{expansion → exploration}/sage.integration.test.d.ts +1 -1
- package/dist/exploration/sage.integration.test.d.ts.map +1 -0
- package/dist/exploration/sage.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/sift.d.ts +12 -12
- package/dist/exploration/sift.d.ts.map +1 -0
- package/dist/{expansion → exploration}/sift.integration.test.d.ts +1 -1
- package/dist/exploration/sift.integration.test.d.ts.map +1 -0
- package/dist/exploration/sift.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/standard-bfs.d.ts +8 -8
- package/dist/exploration/standard-bfs.d.ts.map +1 -0
- package/dist/exploration/standard-bfs.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/tide.d.ts +8 -8
- package/dist/exploration/tide.d.ts.map +1 -0
- package/dist/{expansion → exploration}/tide.integration.test.d.ts +1 -1
- package/dist/exploration/tide.integration.test.d.ts.map +1 -0
- package/dist/exploration/tide.unit.test.d.ts.map +1 -0
- package/dist/{expansion → exploration}/types.d.ts +17 -17
- package/dist/exploration/types.d.ts.map +1 -0
- package/dist/{expansion → exploration}/warp.d.ts +8 -8
- package/dist/exploration/warp.d.ts.map +1 -0
- package/dist/{expansion → exploration}/warp.integration.test.d.ts +1 -1
- package/dist/exploration/warp.integration.test.d.ts.map +1 -0
- package/dist/exploration/warp.unit.test.d.ts.map +1 -0
- package/dist/{expansion--UuRowv-.cjs → exploration-BfDi17av.cjs} +136 -136
- package/dist/exploration-BfDi17av.cjs.map +1 -0
- package/dist/{expansion-CZLNK6Pr.js → exploration-DKjRNxS5.js} +136 -136
- package/dist/exploration-DKjRNxS5.js.map +1 -0
- package/dist/index/index.cjs +50 -50
- package/dist/index/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/ranking/baselines/betweenness.d.ts +2 -2
- package/dist/ranking/baselines/betweenness.d.ts.map +1 -1
- package/dist/ranking/baselines/communicability.d.ts +3 -3
- package/dist/ranking/baselines/communicability.d.ts.map +1 -1
- package/dist/ranking/baselines/degree-sum.d.ts +2 -2
- package/dist/ranking/baselines/degree-sum.d.ts.map +1 -1
- package/dist/ranking/baselines/hitting-time.d.ts +2 -2
- package/dist/ranking/baselines/hitting-time.d.ts.map +1 -1
- package/dist/ranking/baselines/jaccard-arithmetic.d.ts +2 -2
- package/dist/ranking/baselines/jaccard-arithmetic.d.ts.map +1 -1
- package/dist/ranking/baselines/katz.d.ts +3 -3
- package/dist/ranking/baselines/katz.d.ts.map +1 -1
- package/dist/ranking/baselines/pagerank.d.ts +3 -3
- package/dist/ranking/baselines/pagerank.d.ts.map +1 -1
- package/dist/ranking/baselines/random-ranking.d.ts +2 -2
- package/dist/ranking/baselines/random-ranking.d.ts.map +1 -1
- package/dist/ranking/baselines/resistance-distance.d.ts +2 -2
- package/dist/ranking/baselines/resistance-distance.d.ts.map +1 -1
- package/dist/ranking/baselines/shortest.d.ts +2 -2
- package/dist/ranking/baselines/shortest.d.ts.map +1 -1
- package/dist/ranking/baselines/types.d.ts +3 -3
- package/dist/ranking/baselines/types.d.ts.map +1 -1
- package/dist/ranking/baselines/utils.d.ts +3 -3
- package/dist/ranking/baselines/utils.d.ts.map +1 -1
- package/dist/ranking/baselines/widest-path.d.ts +2 -2
- package/dist/ranking/baselines/widest-path.d.ts.map +1 -1
- package/dist/ranking/parse-gpu.d.ts +2 -2
- package/dist/ranking/parse-gpu.d.ts.map +1 -1
- package/dist/ranking/parse.d.ts +4 -4
- package/dist/ranking/parse.d.ts.map +1 -1
- package/dist/ranking-BQqrH26-.cjs.map +1 -1
- package/dist/ranking-B_KdM8Wq.js.map +1 -1
- package/dist/schemas/graph.d.ts +1 -1
- package/dist/schemas/index.cjs +1 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/utils/entropy.d.ts +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/expansion/base-core.d.ts.map +0 -1
- package/dist/expansion/base-core.unit.test.d.ts.map +0 -1
- package/dist/expansion/base-helpers.d.ts.map +0 -1
- package/dist/expansion/base.d.ts.map +0 -1
- package/dist/expansion/base.unit.test.d.ts.map +0 -1
- package/dist/expansion/comparison.integration.test.d.ts.map +0 -1
- package/dist/expansion/dfs-priority.d.ts.map +0 -1
- package/dist/expansion/dfs-priority.unit.test.d.ts.map +0 -1
- package/dist/expansion/dome.d.ts.map +0 -1
- package/dist/expansion/dome.integration.test.d.ts.map +0 -1
- package/dist/expansion/dome.unit.test.d.ts.map +0 -1
- package/dist/expansion/edge.d.ts.map +0 -1
- package/dist/expansion/edge.integration.test.d.ts.map +0 -1
- package/dist/expansion/edge.unit.test.d.ts.map +0 -1
- package/dist/expansion/flux.d.ts.map +0 -1
- package/dist/expansion/flux.integration.test.d.ts.map +0 -1
- package/dist/expansion/flux.unit.test.d.ts.map +0 -1
- package/dist/expansion/frontier-balanced.d.ts.map +0 -1
- package/dist/expansion/frontier-balanced.unit.test.d.ts.map +0 -1
- package/dist/expansion/fuse.d.ts.map +0 -1
- package/dist/expansion/fuse.integration.test.d.ts.map +0 -1
- package/dist/expansion/fuse.unit.test.d.ts.map +0 -1
- package/dist/expansion/hae.d.ts.map +0 -1
- package/dist/expansion/hae.integration.test.d.ts.map +0 -1
- package/dist/expansion/hae.unit.test.d.ts.map +0 -1
- package/dist/expansion/index.cjs +0 -51
- package/dist/expansion/index.d.ts.map +0 -1
- package/dist/expansion/k-hop.d.ts.map +0 -1
- package/dist/expansion/k-hop.unit.test.d.ts.map +0 -1
- package/dist/expansion/lace.d.ts.map +0 -1
- package/dist/expansion/lace.integration.test.d.ts.map +0 -1
- package/dist/expansion/lace.unit.test.d.ts.map +0 -1
- package/dist/expansion/maze.d.ts.map +0 -1
- package/dist/expansion/maze.integration.test.d.ts.map +0 -1
- package/dist/expansion/maze.unit.test.d.ts.map +0 -1
- package/dist/expansion/pipe.d.ts.map +0 -1
- package/dist/expansion/pipe.integration.test.d.ts.map +0 -1
- package/dist/expansion/pipe.unit.test.d.ts.map +0 -1
- package/dist/expansion/priority-helpers.d.ts.map +0 -1
- package/dist/expansion/random-priority.d.ts.map +0 -1
- package/dist/expansion/random-priority.unit.test.d.ts.map +0 -1
- package/dist/expansion/random-walk.d.ts.map +0 -1
- package/dist/expansion/random-walk.unit.test.d.ts.map +0 -1
- package/dist/expansion/reach.d.ts.map +0 -1
- package/dist/expansion/reach.integration.test.d.ts.map +0 -1
- package/dist/expansion/reach.unit.test.d.ts.map +0 -1
- package/dist/expansion/sage.d.ts.map +0 -1
- package/dist/expansion/sage.integration.test.d.ts.map +0 -1
- package/dist/expansion/sage.unit.test.d.ts.map +0 -1
- package/dist/expansion/sift.d.ts.map +0 -1
- package/dist/expansion/sift.integration.test.d.ts.map +0 -1
- package/dist/expansion/sift.unit.test.d.ts.map +0 -1
- package/dist/expansion/standard-bfs.d.ts.map +0 -1
- package/dist/expansion/standard-bfs.unit.test.d.ts.map +0 -1
- package/dist/expansion/tide.d.ts.map +0 -1
- package/dist/expansion/tide.integration.test.d.ts.map +0 -1
- package/dist/expansion/tide.unit.test.d.ts.map +0 -1
- package/dist/expansion/types.d.ts.map +0 -1
- package/dist/expansion/warp.d.ts.map +0 -1
- package/dist/expansion/warp.integration.test.d.ts.map +0 -1
- package/dist/expansion/warp.unit.test.d.ts.map +0 -1
- package/dist/expansion--UuRowv-.cjs.map +0 -1
- package/dist/expansion-CZLNK6Pr.js.map +0 -1
- /package/dist/{expansion → exploration}/base-core.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/base.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/dfs-priority.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/dome.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/edge.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/flux.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/frontier-balanced.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/fuse.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/hae.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/k-hop.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/lace.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/maze.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/pipe.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/random-priority.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/random-walk.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/reach.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/sage.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/sift.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/standard-bfs.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/tide.unit.test.d.ts +0 -0
- /package/dist/{expansion → exploration}/warp.unit.test.d.ts +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Run DOME
|
|
6
|
+
* Run DOME exploration (degree-ordered).
|
|
7
7
|
*
|
|
8
8
|
* @param graph - Source graph
|
|
9
|
-
* @param seeds - Seed nodes for
|
|
9
|
+
* @param seeds - Seed nodes for exploration
|
|
10
10
|
* @param config - Expansion configuration
|
|
11
11
|
* @returns Expansion result with discovered paths
|
|
12
12
|
*/
|
|
13
|
-
export declare function dome<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?:
|
|
13
|
+
export declare function dome<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: ExplorationConfig<N, E>): ExplorationResult;
|
|
14
14
|
/**
|
|
15
|
-
* Run DOME
|
|
15
|
+
* Run DOME exploration asynchronously (degree-ordered).
|
|
16
16
|
*
|
|
17
17
|
* @param graph - Async source graph
|
|
18
|
-
* @param seeds - Seed nodes for
|
|
18
|
+
* @param seeds - Seed nodes for exploration
|
|
19
19
|
* @param config - Expansion and async runner configuration
|
|
20
|
-
* @returns Promise resolving to the
|
|
20
|
+
* @returns Promise resolving to the exploration result
|
|
21
21
|
*/
|
|
22
|
-
export declare function domeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<
|
|
22
|
+
export declare function domeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
23
23
|
/**
|
|
24
24
|
* DOME with reverse priority (high degree first).
|
|
25
25
|
*/
|
|
26
|
-
export declare function domeHighDegree<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?:
|
|
26
|
+
export declare function domeHighDegree<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: ExplorationConfig<N, E>): ExplorationResult;
|
|
27
27
|
/**
|
|
28
|
-
* Run DOME high-degree
|
|
28
|
+
* Run DOME high-degree exploration asynchronously (high degree first).
|
|
29
29
|
*
|
|
30
30
|
* @param graph - Async source graph
|
|
31
|
-
* @param seeds - Seed nodes for
|
|
31
|
+
* @param seeds - Seed nodes for exploration
|
|
32
32
|
* @param config - Expansion and async runner configuration
|
|
33
|
-
* @returns Promise resolving to the
|
|
33
|
+
* @returns Promise resolving to the exploration result
|
|
34
34
|
*/
|
|
35
|
-
export declare function domeHighDegreeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<
|
|
35
|
+
export declare function domeHighDegreeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
36
36
|
//# sourceMappingURL=dome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dome.d.ts","sourceRoot":"","sources":["../../src/exploration/dome.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM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C,iBAAiB,CAAC,CAK5B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Integration test for DOME
|
|
2
|
+
* Integration test for DOME exploration algorithm.
|
|
3
3
|
*
|
|
4
4
|
* DOME demonstrates hub deferral: it defers exploration of high-degree nodes
|
|
5
|
-
* and prioritises low-degree frontier
|
|
5
|
+
* and prioritises low-degree frontier exploration, discovering paths through
|
|
6
6
|
* sparse regions before exhausting hub-centric neighbours.
|
|
7
7
|
*
|
|
8
8
|
* This test uses a social network with a hub (Alice, degree 10+) and niche
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dome.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/dome.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dome.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/dome.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Run EDGE
|
|
6
|
+
* Run EDGE exploration (Entropy-Driven Graph Exploration).
|
|
7
7
|
*
|
|
8
8
|
* Discovers paths by prioritising nodes with diverse neighbour types,
|
|
9
9
|
* deferring nodes with homogeneous neighbourhoods.
|
|
10
10
|
*
|
|
11
11
|
* @param graph - Source graph
|
|
12
|
-
* @param seeds - Seed nodes for
|
|
12
|
+
* @param seeds - Seed nodes for exploration
|
|
13
13
|
* @param config - Expansion configuration
|
|
14
14
|
* @returns Expansion result with discovered paths
|
|
15
15
|
*/
|
|
16
|
-
export declare function edge<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?:
|
|
16
|
+
export declare function edge<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: ExplorationConfig<N, E>): ExplorationResult;
|
|
17
17
|
/**
|
|
18
|
-
* Run EDGE
|
|
18
|
+
* Run EDGE exploration asynchronously.
|
|
19
19
|
*
|
|
20
20
|
* Delegates to `haeAsync` with the default `node.type` mapper.
|
|
21
21
|
*
|
|
@@ -25,9 +25,9 @@ export declare function edge<N extends NodeData, E extends EdgeData>(graph: Read
|
|
|
25
25
|
* surface; use with a `wrapAsync`-wrapped sync graph for testing.
|
|
26
26
|
*
|
|
27
27
|
* @param graph - Async source graph
|
|
28
|
-
* @param seeds - Seed nodes for
|
|
28
|
+
* @param seeds - Seed nodes for exploration
|
|
29
29
|
* @param config - Expansion and async runner configuration
|
|
30
|
-
* @returns Promise resolving to the
|
|
30
|
+
* @returns Promise resolving to the exploration result
|
|
31
31
|
*/
|
|
32
|
-
export declare function edgeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<
|
|
32
|
+
export declare function edgeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
33
33
|
//# sourceMappingURL=edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/exploration/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAOnD;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EAC1D,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC9B,iBAAiB,CAKnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EACrE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAK5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/edge.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/edge.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Configuration for MAZE
|
|
6
|
+
* Configuration for MAZE exploration.
|
|
7
7
|
*/
|
|
8
|
-
export interface MAZEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends
|
|
8
|
+
export interface MAZEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends ExplorationConfig<N, E> {
|
|
9
9
|
/** Density threshold for switching to EDGE mode (default: 0.5) */
|
|
10
10
|
readonly densityThreshold?: number;
|
|
11
11
|
/** Bridge threshold for switching to PIPE mode (default: 0.3) */
|
|
12
12
|
readonly bridgeThreshold?: number;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Run FLUX
|
|
15
|
+
* Run FLUX exploration algorithm.
|
|
16
16
|
*
|
|
17
|
-
* Adaptively switches between
|
|
17
|
+
* Adaptively switches between exploration strategies based on
|
|
18
18
|
* local graph structure. Useful for heterogeneous graphs
|
|
19
19
|
* with varying density.
|
|
20
20
|
*
|
|
21
21
|
* @param graph - Source graph
|
|
22
|
-
* @param seeds - Seed nodes for
|
|
22
|
+
* @param seeds - Seed nodes for exploration
|
|
23
23
|
* @param config - Expansion configuration
|
|
24
24
|
* @returns Expansion result with discovered paths
|
|
25
25
|
*/
|
|
26
|
-
export declare function flux<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: MAZEConfig<N, E>):
|
|
26
|
+
export declare function flux<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: MAZEConfig<N, E>): ExplorationResult;
|
|
27
27
|
/**
|
|
28
|
-
* Run FLUX
|
|
28
|
+
* Run FLUX exploration asynchronously.
|
|
29
29
|
*
|
|
30
30
|
* Note: the FLUX priority function accesses `context.graph` to compute
|
|
31
31
|
* local density and cross-frontier bridge scores. Full async equivalence
|
|
@@ -33,9 +33,9 @@ export declare function flux<N extends NodeData, E extends EdgeData>(graph: Read
|
|
|
33
33
|
* establishes the async API surface.
|
|
34
34
|
*
|
|
35
35
|
* @param graph - Async source graph
|
|
36
|
-
* @param seeds - Seed nodes for
|
|
36
|
+
* @param seeds - Seed nodes for exploration
|
|
37
37
|
* @param config - FLUX (MAZEConfig) configuration combined with async runner options
|
|
38
|
-
* @returns Promise resolving to the
|
|
38
|
+
* @returns Promise resolving to the exploration result
|
|
39
39
|
*/
|
|
40
|
-
export declare function fluxAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: MAZEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<
|
|
40
|
+
export declare function fluxAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: MAZEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
41
41
|
//# sourceMappingURL=flux.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flux.d.ts","sourceRoot":"","sources":["../../src/exploration/flux.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACX,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EAEjB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAInD;;GAEG;AACH,MAAM,WAAW,UAAU,CAC1B,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7B,CAAC,SAAS,QAAQ,GAAG,QAAQ,CAC5B,SAAQ,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,iEAAiE;IACjE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CAClC;AA0ED;;;;;;;;;;;GAWG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EAC1D,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,iBAAiB,CAcnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EACrE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpD,OAAO,CAAC,iBAAiB,CAAC,CAW5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flux.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/flux.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flux.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/flux.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Run frontier-balanced
|
|
6
|
+
* Run frontier-balanced exploration (round-robin across frontiers).
|
|
7
7
|
*
|
|
8
8
|
* @param graph - Source graph
|
|
9
|
-
* @param seeds - Seed nodes for
|
|
9
|
+
* @param seeds - Seed nodes for exploration
|
|
10
10
|
* @param config - Expansion configuration
|
|
11
11
|
* @returns Expansion result with discovered paths
|
|
12
12
|
*/
|
|
13
|
-
export declare function frontierBalanced<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?:
|
|
13
|
+
export declare function frontierBalanced<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: ExplorationConfig<N, E>): ExplorationResult;
|
|
14
14
|
/**
|
|
15
|
-
* Run frontier-balanced
|
|
15
|
+
* Run frontier-balanced exploration asynchronously (round-robin across frontiers).
|
|
16
16
|
*
|
|
17
17
|
* @param graph - Async source graph
|
|
18
|
-
* @param seeds - Seed nodes for
|
|
18
|
+
* @param seeds - Seed nodes for exploration
|
|
19
19
|
* @param config - Expansion and async runner configuration
|
|
20
|
-
* @returns Promise resolving to the
|
|
20
|
+
* @returns Promise resolving to the exploration result
|
|
21
21
|
*/
|
|
22
|
-
export declare function frontierBalancedAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<
|
|
22
|
+
export declare function frontierBalancedAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
23
23
|
//# sourceMappingURL=frontier-balanced.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontier-balanced.d.ts","sourceRoot":"","sources":["../../src/exploration/frontier-balanced.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACX,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EAEjB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAanD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EACtE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC9B,iBAAiB,CAKnB;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAC1C,CAAC,SAAS,QAAQ,EAClB,CAAC,SAAS,QAAQ,EAElB,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAE5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontier-balanced.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/frontier-balanced.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig, BatchPriorityFunction } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Configuration for FUSE
|
|
6
|
+
* Configuration for FUSE exploration.
|
|
7
7
|
*/
|
|
8
|
-
export interface FUSEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends
|
|
8
|
+
export interface FUSEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends ExplorationConfig<N, E> {
|
|
9
9
|
/** MI function for salience computation (default: jaccard) */
|
|
10
10
|
readonly mi?: (graph: ReadableGraph<N, E>, source: string, target: string) => number;
|
|
11
11
|
/** Weight for salience component (0-1, default: 0.5) */
|
|
@@ -16,19 +16,19 @@ export interface FUSEConfig<N extends NodeData = NodeData, E extends EdgeData =
|
|
|
16
16
|
*/
|
|
17
17
|
export type SAGEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> = FUSEConfig<N, E>;
|
|
18
18
|
/**
|
|
19
|
-
* Run FUSE
|
|
19
|
+
* Run FUSE exploration algorithm.
|
|
20
20
|
*
|
|
21
21
|
* Combines structural exploration with semantic salience.
|
|
22
22
|
* Useful for finding paths that are both short and semantically meaningful.
|
|
23
23
|
*
|
|
24
24
|
* @param graph - Source graph
|
|
25
|
-
* @param seeds - Seed nodes for
|
|
25
|
+
* @param seeds - Seed nodes for exploration
|
|
26
26
|
* @param config - Expansion configuration with MI function
|
|
27
27
|
* @returns Expansion result with discovered paths
|
|
28
28
|
*/
|
|
29
|
-
export declare function fuse<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: FUSEConfig<N, E>):
|
|
29
|
+
export declare function fuse<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: FUSEConfig<N, E>): ExplorationResult;
|
|
30
30
|
/**
|
|
31
|
-
* Run FUSE
|
|
31
|
+
* Run FUSE exploration asynchronously.
|
|
32
32
|
*
|
|
33
33
|
* Note: the FUSE priority function accesses `context.graph` via
|
|
34
34
|
* `avgFrontierMI`. Full async equivalence requires PriorityContext
|
|
@@ -36,11 +36,11 @@ export declare function fuse<N extends NodeData, E extends EdgeData>(graph: Read
|
|
|
36
36
|
* API surface.
|
|
37
37
|
*
|
|
38
38
|
* @param graph - Async source graph
|
|
39
|
-
* @param seeds - Seed nodes for
|
|
39
|
+
* @param seeds - Seed nodes for exploration
|
|
40
40
|
* @param config - FUSE configuration combined with async runner options
|
|
41
|
-
* @returns Promise resolving to the
|
|
41
|
+
* @returns Promise resolving to the exploration result
|
|
42
42
|
*/
|
|
43
|
-
export declare function fuseAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: FUSEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<
|
|
43
|
+
export declare function fuseAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: FUSEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
44
44
|
/**
|
|
45
45
|
* Create a batch priority function for FUSE with configurable weight.
|
|
46
46
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuse.d.ts","sourceRoot":"","sources":["../../src/exploration/fuse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAU,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACX,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EAGjB,qBAAqB,EACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AASnD;;GAEG;AACH,MAAM,WAAW,UAAU,CAC1B,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7B,CAAC,SAAS,QAAQ,GAAG,QAAQ,CAC5B,SAAQ,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,EAAE,CACb,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,KACV,MAAM,CAAC;IACZ,wDAAwD;IACxD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CACrB,CAAC,SAAS,QAAQ,GAAG,QAAQ,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,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Integration test for FUSE
|
|
2
|
+
* Integration test for FUSE exploration algorithm.
|
|
3
3
|
*
|
|
4
4
|
* FUSE (Salience-guided Adaptive Graph Expansion) is a two-phase algorithm
|
|
5
5
|
* that accumulates salience feedback from discovered paths. Early high-MI paths
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuse.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/fuse.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuse.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/fuse.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Configuration for HAE, extending base
|
|
6
|
+
* Configuration for HAE, extending base ExplorationConfig.
|
|
7
7
|
*/
|
|
8
|
-
export interface HAEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends
|
|
8
|
+
export interface HAEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends ExplorationConfig<N, E> {
|
|
9
9
|
/** Function to extract type from a node (default: node.type) */
|
|
10
10
|
readonly typeMapper?: (node: N) => string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Run HAE
|
|
13
|
+
* Run HAE exploration (Heterogeneity-Aware Exploration).
|
|
14
14
|
*
|
|
15
15
|
* Discovers paths by prioritising nodes with diverse neighbour types,
|
|
16
16
|
* using a custom type mapper for flexible type extraction.
|
|
17
17
|
*
|
|
18
18
|
* @param graph - Source graph
|
|
19
|
-
* @param seeds - Seed nodes for
|
|
19
|
+
* @param seeds - Seed nodes for exploration
|
|
20
20
|
* @param config - HAE configuration with optional typeMapper
|
|
21
21
|
* @returns Expansion result with discovered paths
|
|
22
22
|
*/
|
|
23
|
-
export declare function hae<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: HAEConfig<N, E>):
|
|
23
|
+
export declare function hae<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: HAEConfig<N, E>): ExplorationResult;
|
|
24
24
|
/**
|
|
25
|
-
* Run HAE
|
|
25
|
+
* Run HAE exploration asynchronously.
|
|
26
26
|
*
|
|
27
27
|
* Note: the HAE priority function accesses `context.graph` to retrieve
|
|
28
28
|
* neighbour types. Full async equivalence requires PriorityContext
|
|
@@ -30,9 +30,9 @@ export declare function hae<N extends NodeData, E extends EdgeData>(graph: Reada
|
|
|
30
30
|
* surface; use with a `wrapAsync`-wrapped sync graph for testing.
|
|
31
31
|
*
|
|
32
32
|
* @param graph - Async source graph
|
|
33
|
-
* @param seeds - Seed nodes for
|
|
33
|
+
* @param seeds - Seed nodes for exploration
|
|
34
34
|
* @param config - HAE configuration combined with async runner options
|
|
35
|
-
* @returns Promise resolving to the
|
|
35
|
+
* @returns Promise resolving to the exploration result
|
|
36
36
|
*/
|
|
37
|
-
export declare function haeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: HAEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<
|
|
37
|
+
export declare function haeAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: HAEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
38
38
|
//# sourceMappingURL=hae.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hae.d.ts","sourceRoot":"","sources":["../../src/exploration/hae.ts"],"names":[],"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
|
-
* Integration test for HAE
|
|
2
|
+
* Integration test for HAE exploration algorithm.
|
|
3
3
|
*
|
|
4
|
-
* HAE (Heterogeneity-Aware
|
|
4
|
+
* HAE (Heterogeneity-Aware Exploration) generalises EDGE by allowing
|
|
5
5
|
* custom type extraction via a user-supplied typeMapper function.
|
|
6
6
|
*
|
|
7
7
|
* This test demonstrates HAE's ability to use custom type definitions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hae.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/hae.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hae.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/hae.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_exploration = require("../exploration-BfDi17av.cjs");
|
|
3
|
+
exports.base = require_exploration.base;
|
|
4
|
+
exports.baseAsync = require_exploration.baseAsync;
|
|
5
|
+
exports.createFuseBatchPriority = require_exploration.createFuseBatchPriority;
|
|
6
|
+
exports.createSiftBatchPriority = require_exploration.createSiftBatchPriority;
|
|
7
|
+
exports.dfsPriority = require_exploration.dfsPriority;
|
|
8
|
+
exports.dfsPriorityAsync = require_exploration.dfsPriorityAsync;
|
|
9
|
+
exports.dfsPriorityFn = require_exploration.dfsPriorityFn;
|
|
10
|
+
exports.dome = require_exploration.dome;
|
|
11
|
+
exports.domeAsync = require_exploration.domeAsync;
|
|
12
|
+
exports.domeHighDegree = require_exploration.domeHighDegree;
|
|
13
|
+
exports.domeHighDegreeAsync = require_exploration.domeHighDegreeAsync;
|
|
14
|
+
exports.edge = require_exploration.edge;
|
|
15
|
+
exports.edgeAsync = require_exploration.edgeAsync;
|
|
16
|
+
exports.flux = require_exploration.flux;
|
|
17
|
+
exports.fluxAsync = require_exploration.fluxAsync;
|
|
18
|
+
exports.frontierBalanced = require_exploration.frontierBalanced;
|
|
19
|
+
exports.frontierBalancedAsync = require_exploration.frontierBalancedAsync;
|
|
20
|
+
exports.fuse = require_exploration.fuse;
|
|
21
|
+
exports.fuseAsync = require_exploration.fuseAsync;
|
|
22
|
+
exports.fuseBatchPriority = require_exploration.fuseBatchPriority;
|
|
23
|
+
exports.fuseWithBatchPriority = require_exploration.fuseWithBatchPriority;
|
|
24
|
+
exports.hae = require_exploration.hae;
|
|
25
|
+
exports.haeAsync = require_exploration.haeAsync;
|
|
26
|
+
exports.kHop = require_exploration.kHop;
|
|
27
|
+
exports.lace = require_exploration.lace;
|
|
28
|
+
exports.laceAsync = require_exploration.laceAsync;
|
|
29
|
+
exports.laceBatchPriority = require_exploration.laceBatchPriority;
|
|
30
|
+
exports.laceWithBatchPriority = require_exploration.laceWithBatchPriority;
|
|
31
|
+
exports.maze = require_exploration.maze;
|
|
32
|
+
exports.mazeAsync = require_exploration.mazeAsync;
|
|
33
|
+
exports.pipe = require_exploration.pipe;
|
|
34
|
+
exports.pipeAsync = require_exploration.pipeAsync;
|
|
35
|
+
exports.randomPriority = require_exploration.randomPriority;
|
|
36
|
+
exports.randomPriorityAsync = require_exploration.randomPriorityAsync;
|
|
37
|
+
exports.randomWalk = require_exploration.randomWalk;
|
|
38
|
+
exports.reach = require_exploration.reach;
|
|
39
|
+
exports.reachAsync = require_exploration.reachAsync;
|
|
40
|
+
exports.sage = require_exploration.sage;
|
|
41
|
+
exports.sageAsync = require_exploration.sageAsync;
|
|
42
|
+
exports.sift = require_exploration.sift;
|
|
43
|
+
exports.siftAsync = require_exploration.siftAsync;
|
|
44
|
+
exports.siftBatchPriority = require_exploration.siftBatchPriority;
|
|
45
|
+
exports.siftWithBatchPriority = require_exploration.siftWithBatchPriority;
|
|
46
|
+
exports.standardBfs = require_exploration.standardBfs;
|
|
47
|
+
exports.standardBfsAsync = require_exploration.standardBfsAsync;
|
|
48
|
+
exports.tide = require_exploration.tide;
|
|
49
|
+
exports.tideAsync = require_exploration.tideAsync;
|
|
50
|
+
exports.warp = require_exploration.warp;
|
|
51
|
+
exports.warpAsync = require_exploration.warpAsync;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Exploration algorithms module.
|
|
3
3
|
*
|
|
4
|
-
* Provides bidirectional
|
|
4
|
+
* Provides bidirectional exploration algorithms for discovering paths
|
|
5
5
|
* between seed nodes in a graph.
|
|
6
6
|
*
|
|
7
|
-
* @module
|
|
7
|
+
* @module exploration
|
|
8
8
|
*/
|
|
9
9
|
export * from './types';
|
|
10
10
|
export * from './base';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exploration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as tide, B as edge, C as fuseWithBatchPriority, D as laceAsync, E as lace, F as reachAsync, G as domeAsync, H as hae, I as sage, J as base, K as domeHighDegree, L as sageAsync, M as maze, N as mazeAsync, O as laceBatchPriority, P as reach, R as pipe, S as fuseBatchPriority, T as warpAsync, U as haeAsync, V as edgeAsync, W as dome, Y as baseAsync, _ as siftBatchPriority, a as dfsPriorityFn, b as fuse, c as frontierBalanced, d as standardBfsAsync, f as flux, g as siftAsync, h as sift, i as dfsPriorityAsync, j as tideAsync, k as laceWithBatchPriority, l as frontierBalancedAsync, m as createSiftBatchPriority, n as kHop, o as randomPriority, p as fluxAsync, q as domeHighDegreeAsync, r as dfsPriority, s as randomPriorityAsync, t as randomWalk, u as standardBfs, v as siftWithBatchPriority, w as warp, x as fuseAsync, y as createFuseBatchPriority, z as pipeAsync } from "../
|
|
1
|
+
import { A as tide, B as edge, C as fuseWithBatchPriority, D as laceAsync, E as lace, F as reachAsync, G as domeAsync, H as hae, I as sage, J as base, K as domeHighDegree, L as sageAsync, M as maze, N as mazeAsync, O as laceBatchPriority, P as reach, R as pipe, S as fuseBatchPriority, T as warpAsync, U as haeAsync, V as edgeAsync, W as dome, Y as baseAsync, _ as siftBatchPriority, a as dfsPriorityFn, b as fuse, c as frontierBalanced, d as standardBfsAsync, f as flux, g as siftAsync, h as sift, i as dfsPriorityAsync, j as tideAsync, k as laceWithBatchPriority, l as frontierBalancedAsync, m as createSiftBatchPriority, n as kHop, o as randomPriority, p as fluxAsync, q as domeHighDegreeAsync, r as dfsPriority, s as randomPriorityAsync, t as randomWalk, u as standardBfs, v as siftWithBatchPriority, w as warp, x as fuseAsync, y as createFuseBatchPriority, z as pipeAsync } from "../exploration-DKjRNxS5.js";
|
|
2
2
|
export { base, baseAsync, createFuseBatchPriority, createSiftBatchPriority, dfsPriority, dfsPriorityAsync, dfsPriorityFn, dome, domeAsync, domeHighDegree, domeHighDegreeAsync, edge, edgeAsync, flux, fluxAsync, frontierBalanced, frontierBalancedAsync, fuse, fuseAsync, fuseBatchPriority, fuseWithBatchPriority, hae, haeAsync, kHop, lace, laceAsync, laceBatchPriority, laceWithBatchPriority, maze, mazeAsync, pipe, pipeAsync, randomPriority, randomPriorityAsync, randomWalk, reach, reachAsync, sage, sageAsync, sift, siftAsync, siftBatchPriority, siftWithBatchPriority, standardBfs, standardBfsAsync, tide, tideAsync, warp, warpAsync };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph } from '../graph';
|
|
2
|
-
import { Seed,
|
|
2
|
+
import { Seed, ExplorationResult, ExplorationConfig } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* Configuration for k-hop
|
|
4
|
+
* Configuration for k-hop exploration.
|
|
5
5
|
*/
|
|
6
|
-
export interface KHopConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends
|
|
6
|
+
export interface KHopConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends ExplorationConfig<N, E> {
|
|
7
7
|
/**
|
|
8
8
|
* Maximum number of hops from any seed node.
|
|
9
9
|
* Defaults to 2.
|
|
@@ -11,16 +11,16 @@ export interface KHopConfig<N extends NodeData = NodeData, E extends EdgeData =
|
|
|
11
11
|
readonly k?: number;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Run k-hop
|
|
14
|
+
* Run k-hop exploration (fixed-depth BFS).
|
|
15
15
|
*
|
|
16
16
|
* Explores all nodes reachable within exactly k hops of any seed using
|
|
17
17
|
* breadth-first search. Paths between seeds are detected when a node
|
|
18
18
|
* is reached by frontiers from two different seeds.
|
|
19
19
|
*
|
|
20
20
|
* @param graph - Source graph
|
|
21
|
-
* @param seeds - Seed nodes for
|
|
21
|
+
* @param seeds - Seed nodes for exploration
|
|
22
22
|
* @param config - K-hop configuration (k defaults to 2)
|
|
23
23
|
* @returns Expansion result with discovered paths
|
|
24
24
|
*/
|
|
25
|
-
export declare function kHop<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: KHopConfig<N, E>):
|
|
25
|
+
export declare function kHop<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: KHopConfig<N, E>): ExplorationResult;
|
|
26
26
|
//# sourceMappingURL=k-hop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k-hop.d.ts","sourceRoot":"","sources":["../../src/exploration/k-hop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAU,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EACX,IAAI,EACJ,iBAAiB,EAGjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,UAAU,CAC1B,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7B,CAAC,SAAS,QAAQ,GAAG,QAAQ,CAC5B,SAAQ,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,QAAQ,EAC1D,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,iBAAiB,CA4JnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k-hop.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/k-hop.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { NodeData, EdgeData, ReadableGraph, NodeId } from '../graph';
|
|
2
2
|
import { AsyncReadableGraph } from '../graph/async-interfaces';
|
|
3
|
-
import { Seed,
|
|
3
|
+
import { Seed, ExplorationResult, ExplorationConfig, BatchPriorityContext, BatchPriorityFunction } from './types';
|
|
4
4
|
import { AsyncExpansionConfig } from './base';
|
|
5
5
|
/**
|
|
6
|
-
* Configuration for LACE
|
|
6
|
+
* Configuration for LACE exploration.
|
|
7
7
|
*/
|
|
8
|
-
export interface LACEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends
|
|
8
|
+
export interface LACEConfig<N extends NodeData = NodeData, E extends EdgeData = EdgeData> extends ExplorationConfig<N, E> {
|
|
9
9
|
/** MI function for computing edge priorities (default: jaccard) */
|
|
10
10
|
readonly mi?: (graph: ReadableGraph<N, E>, source: string, target: string) => number;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Run LACE
|
|
13
|
+
* Run LACE exploration algorithm.
|
|
14
14
|
*
|
|
15
15
|
* Expands from seeds prioritising high-MI edges.
|
|
16
16
|
* Useful for finding paths with strong semantic associations.
|
|
17
17
|
*
|
|
18
18
|
* @param graph - Source graph
|
|
19
|
-
* @param seeds - Seed nodes for
|
|
19
|
+
* @param seeds - Seed nodes for exploration
|
|
20
20
|
* @param config - Expansion configuration with MI function
|
|
21
21
|
* @returns Expansion result with discovered paths
|
|
22
22
|
*/
|
|
23
|
-
export declare function lace<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: LACEConfig<N, E>):
|
|
23
|
+
export declare function lace<N extends NodeData, E extends EdgeData>(graph: ReadableGraph<N, E>, seeds: readonly Seed[], config?: LACEConfig<N, E>): ExplorationResult;
|
|
24
24
|
/**
|
|
25
|
-
* Run LACE
|
|
25
|
+
* Run LACE exploration asynchronously.
|
|
26
26
|
*
|
|
27
27
|
* Note: the LACE priority function accesses `context.graph` via
|
|
28
28
|
* `avgFrontierMI`. Full async equivalence requires PriorityContext
|
|
@@ -30,13 +30,13 @@ export declare function lace<N extends NodeData, E extends EdgeData>(graph: Read
|
|
|
30
30
|
* API surface.
|
|
31
31
|
*
|
|
32
32
|
* @param graph - Async source graph
|
|
33
|
-
* @param seeds - Seed nodes for
|
|
33
|
+
* @param seeds - Seed nodes for exploration
|
|
34
34
|
* @param config - LACE configuration combined with async runner options
|
|
35
|
-
* @returns Promise resolving to the
|
|
35
|
+
* @returns Promise resolving to the exploration result
|
|
36
36
|
*/
|
|
37
|
-
export declare function laceAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: LACEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<
|
|
37
|
+
export declare function laceAsync<N extends NodeData, E extends EdgeData>(graph: AsyncReadableGraph<N, E>, seeds: readonly Seed[], config?: LACEConfig<N, E> & AsyncExpansionConfig<N, E>): Promise<ExplorationResult>;
|
|
38
38
|
/**
|
|
39
|
-
* Batch priority function for LACE
|
|
39
|
+
* Batch priority function for LACE exploration.
|
|
40
40
|
*
|
|
41
41
|
* Computes average MI between each candidate and all nodes visited by the
|
|
42
42
|
* same frontier in a single batch operation. More efficient than computing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lace.d.ts","sourceRoot":"","sources":["../../src/exploration/lace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EACX,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EAEjB,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AASnD;;GAEG;AACH,MAAM,WAAW,UAAU,CAC1B,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7B,CAAC,SAAS,QAAQ,GAAG,QAAQ,CAC5B,SAAQ,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,C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AAC,EAAE,CAAC,CAAC,CAAA;CAAE,CAKnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lace.integration.test.d.ts","sourceRoot":"","sources":["../../src/exploration/lace.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lace.unit.test.d.ts","sourceRoot":"","sources":["../../src/exploration/lace.unit.test.ts"],"names":[],"mappings":""}
|