@graphrs/community 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/chunk-7STDTPIF.js +20 -0
  2. package/dist/chunk-7STDTPIF.js.map +1 -0
  3. package/dist/chunk-CCLSQDUH.js +20 -0
  4. package/dist/chunk-CCLSQDUH.js.map +1 -0
  5. package/dist/chunk-GBWM72ZE.js +20 -0
  6. package/dist/chunk-GBWM72ZE.js.map +1 -0
  7. package/dist/chunk-GF2JEEZD.js +20 -0
  8. package/dist/chunk-GF2JEEZD.js.map +1 -0
  9. package/dist/chunk-KKDSRV3J.js +17 -0
  10. package/dist/chunk-KKDSRV3J.js.map +1 -0
  11. package/dist/chunk-LJII3FXI.js +20 -0
  12. package/dist/chunk-LJII3FXI.js.map +1 -0
  13. package/dist/chunk-U557CCJV.js +20 -0
  14. package/dist/chunk-U557CCJV.js.map +1 -0
  15. package/dist/chunk-UMI2OMVB.js +20 -0
  16. package/dist/chunk-UMI2OMVB.js.map +1 -0
  17. package/dist/chunk-XFXVWUL7.js +20 -0
  18. package/dist/chunk-XFXVWUL7.js.map +1 -0
  19. package/dist/fast-greedy.js +2 -1
  20. package/dist/fluid.js +2 -1
  21. package/dist/index.js +9 -8
  22. package/dist/infomap.d.ts +1 -1
  23. package/dist/infomap.js +2 -1
  24. package/dist/label-propagation.d.ts +1 -1
  25. package/dist/label-propagation.js +2 -1
  26. package/dist/leiden.d.ts +1 -1
  27. package/dist/leiden.js +2 -1
  28. package/dist/louvain.d.ts +1 -1
  29. package/dist/louvain.js +2 -1
  30. package/dist/spinglass.d.ts +1 -1
  31. package/dist/spinglass.js +2 -1
  32. package/dist/walktrap.d.ts +1 -1
  33. package/dist/walktrap.js +2 -1
  34. package/package.json +17 -60
  35. package/LICENSE +0 -21
  36. package/dist/chunk-ELA7RAJX.js +0 -12
  37. package/dist/chunk-ELA7RAJX.js.map +0 -1
  38. package/dist/chunk-JRRIBF6J.js +0 -12
  39. package/dist/chunk-JRRIBF6J.js.map +0 -1
  40. package/dist/chunk-KW3VHOEA.js +0 -14
  41. package/dist/chunk-KW3VHOEA.js.map +0 -1
  42. package/dist/chunk-P4RSJ7VG.js +0 -12
  43. package/dist/chunk-P4RSJ7VG.js.map +0 -1
  44. package/dist/chunk-UYGT3LMM.js +0 -12
  45. package/dist/chunk-UYGT3LMM.js.map +0 -1
  46. package/dist/chunk-XO43IX2E.js +0 -12
  47. package/dist/chunk-XO43IX2E.js.map +0 -1
  48. package/dist/chunk-YCRFRMTW.js +0 -12
  49. package/dist/chunk-YCRFRMTW.js.map +0 -1
  50. package/dist/chunk-ZHL6B6AX.js +0 -12
  51. package/dist/chunk-ZHL6B6AX.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/fast-greedy.ts
4
+ async function fastGreedy(graph) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.fastGreedy());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.modularity,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { fastGreedy };
19
+ //# sourceMappingURL=chunk-7STDTPIF.js.map
20
+ //# sourceMappingURL=chunk-7STDTPIF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/fast-greedy.ts"],"names":[],"mappings":";;;AAGA,eAAsB,WAAW,KAAA,EAAwC;AACvE,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,YAAY,CAAA;AAKtC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-7STDTPIF.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport async function fastGreedy(graph: Graph): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.fastGreedy()) as {\n membership: number[];\n nb_clusters: number;\n modularity: number;\n };\n return {\n membership: raw.membership,\n modularity: raw.modularity,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/infomap.ts
4
+ async function infomap(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.infomap());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.codelength,
11
+ clusters: new Set(raw.membership).size
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { infomap };
19
+ //# sourceMappingURL=chunk-CCLSQDUH.js.map
20
+ //# sourceMappingURL=chunk-CCLSQDUH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/infomap.ts"],"names":[],"mappings":";;;AAOA,eAAsB,OAAA,CAAQ,OAAc,QAAA,EAAqD;AAC/F,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,SAAS,CAAA;AACnC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,QAAA,EAAU,IAAI,GAAA,CAAI,GAAA,CAAI,UAAU,CAAA,CAAE;AAAA,KACpC;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-CCLSQDUH.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface InfomapOptions {\n trials?: number;\n}\n\nexport async function infomap(graph: Graph, _options?: InfomapOptions): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.infomap()) as { membership: number[]; codelength: number };\n return {\n membership: raw.membership,\n modularity: raw.codelength,\n clusters: new Set(raw.membership).size,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/label-propagation.ts
4
+ async function labelPropagation(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.labelPropagation());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: 0,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { labelPropagation };
19
+ //# sourceMappingURL=chunk-GBWM72ZE.js.map
20
+ //# sourceMappingURL=chunk-GBWM72ZE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/label-propagation.ts"],"names":[],"mappings":";;;AAOA,eAAsB,gBAAA,CACpB,OACA,QAAA,EAC0B;AAC1B,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,kBAAkB,CAAA;AAI5C,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,UAAA,EAAY,CAAA;AAAA,MACZ,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-GBWM72ZE.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface LabelPropagationOptions {\n fixed?: number[];\n}\n\nexport async function labelPropagation(\n graph: Graph,\n _options?: LabelPropagationOptions,\n): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.labelPropagation()) as {\n membership: number[];\n nb_clusters: number;\n };\n return {\n membership: raw.membership,\n modularity: 0,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/fluid.ts
4
+ async function fluidCommunities(graph, options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.fluidCommunities(options.numCommunities));
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: 0,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { fluidCommunities };
19
+ //# sourceMappingURL=chunk-GF2JEEZD.js.map
20
+ //# sourceMappingURL=chunk-GF2JEEZD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/fluid.ts"],"names":[],"mappings":";;;AAOA,eAAsB,gBAAA,CACpB,OACA,OAAA,EAC0B;AAC1B,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,MAAM,IAAA,CAAK,KAAA,CAAM,GAAG,gBAAA,CAAiB,OAAA,CAAQ,cAAc,CAAC,CAAA;AAIlE,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,UAAA,EAAY,CAAA;AAAA,MACZ,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-GF2JEEZD.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface FluidOptions {\n numCommunities: number;\n}\n\nexport async function fluidCommunities(\n graph: Graph,\n options: FluidOptions,\n): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.fluidCommunities(options.numCommunities)) as {\n membership: number[];\n nb_clusters: number;\n };\n return {\n membership: raw.membership,\n modularity: 0,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { getWasm } from '@graphrs/core';
2
+
3
+ // src/utils.ts
4
+ async function toWasmGraph(graph) {
5
+ const { WasmGraph } = await getWasm();
6
+ const edges = graph._getEdgePairs();
7
+ const flat = new Uint32Array(edges.length * 2);
8
+ for (let i = 0; i < edges.length; i++) {
9
+ flat[i * 2] = edges[i][0];
10
+ flat[i * 2 + 1] = edges[i][1];
11
+ }
12
+ return WasmGraph.fromEdges(flat, graph.directed);
13
+ }
14
+
15
+ export { toWasmGraph };
16
+ //# sourceMappingURL=chunk-KKDSRV3J.js.map
17
+ //# sourceMappingURL=chunk-KKDSRV3J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.ts"],"names":[],"mappings":";;;AAGA,eAAsB,YAAY,KAAA,EAA0C;AAC1E,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,MAAM,OAAA,EAAQ;AACpC,EAAA,MAAM,KAAA,GAAQ,MAAM,aAAA,EAAc;AAClC,EAAA,MAAM,IAAA,GAAO,IAAI,WAAA,CAAY,KAAA,CAAM,SAAS,CAAC,CAAA;AAC7C,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,KAAA,CAAM,QAAQ,CAAA,EAAA,EAAK;AACrC,IAAA,IAAA,CAAK,IAAI,CAAC,CAAA,GAAI,KAAA,CAAM,CAAC,EAAG,CAAC,CAAA;AACzB,IAAA,IAAA,CAAK,IAAI,CAAA,GAAI,CAAC,IAAI,KAAA,CAAM,CAAC,EAAG,CAAC,CAAA;AAAA,EAC/B;AACA,EAAA,OAAO,SAAA,CAAU,SAAA,CAAU,IAAA,EAAM,KAAA,CAAM,QAAQ,CAAA;AACjD","file":"chunk-KKDSRV3J.js","sourcesContent":["import type { Graph, WasmGraphInstance } from '@graphrs/core';\nimport { getWasm } from '@graphrs/core';\n\nexport async function toWasmGraph(graph: Graph): Promise<WasmGraphInstance> {\n const { WasmGraph } = await getWasm();\n const edges = graph._getEdgePairs();\n const flat = new Uint32Array(edges.length * 2);\n for (let i = 0; i < edges.length; i++) {\n flat[i * 2] = edges[i]![0];\n flat[i * 2 + 1] = edges[i]![1];\n }\n return WasmGraph.fromEdges(flat, graph.directed);\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/leiden.ts
4
+ async function leiden(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.leiden());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.quality,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { leiden };
19
+ //# sourceMappingURL=chunk-LJII3FXI.js.map
20
+ //# sourceMappingURL=chunk-LJII3FXI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/leiden.ts"],"names":[],"mappings":";;;AASA,eAAsB,MAAA,CAAO,OAAc,QAAA,EAAoD;AAC7F,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,QAAQ,CAAA;AAKlC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,OAAA;AAAA,MAChB,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-LJII3FXI.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface LeidenOptions {\n resolution?: number;\n beta?: number;\n iterations?: number;\n}\n\nexport async function leiden(graph: Graph, _options?: LeidenOptions): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.leiden()) as {\n membership: number[];\n quality: number;\n nb_clusters: number;\n };\n return {\n membership: raw.membership,\n modularity: raw.quality,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/walktrap.ts
4
+ async function walktrap(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.walktrap());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.modularity,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { walktrap };
19
+ //# sourceMappingURL=chunk-U557CCJV.js.map
20
+ //# sourceMappingURL=chunk-U557CCJV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/walktrap.ts"],"names":[],"mappings":";;;AAOA,eAAsB,QAAA,CAAS,OAAc,QAAA,EAAsD;AACjG,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,UAAU,CAAA;AAKpC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-U557CCJV.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface WalktrapOptions {\n steps?: number;\n}\n\nexport async function walktrap(graph: Graph, _options?: WalktrapOptions): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.walktrap()) as {\n membership: number[];\n nb_clusters: number;\n modularity: number;\n };\n return {\n membership: raw.membership,\n modularity: raw.modularity,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/louvain.ts
4
+ async function louvain(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.louvain());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.modularity,
11
+ clusters: new Set(raw.membership).size
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { louvain };
19
+ //# sourceMappingURL=chunk-UMI2OMVB.js.map
20
+ //# sourceMappingURL=chunk-UMI2OMVB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/louvain.ts"],"names":[],"mappings":";;;AAOA,eAAsB,OAAA,CAAQ,OAAc,QAAA,EAAqD;AAC/F,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,SAAS,CAAA;AACnC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,QAAA,EAAU,IAAI,GAAA,CAAI,GAAA,CAAI,UAAU,CAAA,CAAE;AAAA,KACpC;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-UMI2OMVB.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface LouvainOptions {\n resolution?: number;\n}\n\nexport async function louvain(graph: Graph, _options?: LouvainOptions): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.louvain()) as { membership: number[]; modularity: number };\n return {\n membership: raw.membership,\n modularity: raw.modularity,\n clusters: new Set(raw.membership).size,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { toWasmGraph } from './chunk-KKDSRV3J.js';
2
+
3
+ // src/spinglass.ts
4
+ async function spinglass(graph, _options) {
5
+ const wg = await toWasmGraph(graph);
6
+ try {
7
+ const raw = JSON.parse(wg.spinglass());
8
+ return {
9
+ membership: raw.membership,
10
+ modularity: raw.modularity,
11
+ clusters: raw.nb_clusters
12
+ };
13
+ } finally {
14
+ wg.free();
15
+ }
16
+ }
17
+
18
+ export { spinglass };
19
+ //# sourceMappingURL=chunk-XFXVWUL7.js.map
20
+ //# sourceMappingURL=chunk-XFXVWUL7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/spinglass.ts"],"names":[],"mappings":";;;AAQA,eAAsB,SAAA,CACpB,OACA,QAAA,EAC0B;AAC1B,EAAA,MAAM,EAAA,GAAK,MAAM,WAAA,CAAY,KAAK,CAAA;AAClC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,EAAA,CAAG,WAAW,CAAA;AAKrC,IAAA,OAAO;AAAA,MACL,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,YAAY,GAAA,CAAI,UAAA;AAAA,MAChB,UAAU,GAAA,CAAI;AAAA,KAChB;AAAA,EACF,CAAA,SAAE;AACA,IAAA,EAAA,CAAG,IAAA,EAAK;AAAA,EACV;AACF","file":"chunk-XFXVWUL7.js","sourcesContent":["import type { Graph, CommunityResult } from '@graphrs/core';\nimport { toWasmGraph } from './utils.js';\n\nexport interface SpinglassOptions {\n spins?: number;\n gamma?: number;\n}\n\nexport async function spinglass(\n graph: Graph,\n _options?: SpinglassOptions,\n): Promise<CommunityResult> {\n const wg = await toWasmGraph(graph);\n try {\n const raw = JSON.parse(wg.spinglass()) as {\n membership: number[];\n modularity: number;\n nb_clusters: number;\n };\n return {\n membership: raw.membership,\n modularity: raw.modularity,\n clusters: raw.nb_clusters,\n };\n } finally {\n wg.free();\n }\n}\n"]}
@@ -1,3 +1,4 @@
1
- export { fastGreedy } from './chunk-UYGT3LMM.js';
1
+ export { fastGreedy } from './chunk-7STDTPIF.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=fast-greedy.js.map
3
4
  //# sourceMappingURL=fast-greedy.js.map
package/dist/fluid.js CHANGED
@@ -1,3 +1,4 @@
1
- export { fluidCommunities } from './chunk-P4RSJ7VG.js';
1
+ export { fluidCommunities } from './chunk-GF2JEEZD.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=fluid.js.map
3
4
  //# sourceMappingURL=fluid.js.map
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
- export { walktrap } from './chunk-ELA7RAJX.js';
2
- export { fastGreedy } from './chunk-UYGT3LMM.js';
3
- export { fluidCommunities } from './chunk-P4RSJ7VG.js';
4
- export { infomap } from './chunk-ZHL6B6AX.js';
5
- export { labelPropagation } from './chunk-XO43IX2E.js';
6
- export { leiden } from './chunk-YCRFRMTW.js';
7
- export { louvain } from './chunk-KW3VHOEA.js';
8
- export { spinglass } from './chunk-JRRIBF6J.js';
1
+ export { walktrap } from './chunk-U557CCJV.js';
2
+ export { fastGreedy } from './chunk-7STDTPIF.js';
3
+ export { fluidCommunities } from './chunk-GF2JEEZD.js';
4
+ export { infomap } from './chunk-CCLSQDUH.js';
5
+ export { labelPropagation } from './chunk-GBWM72ZE.js';
6
+ export { leiden } from './chunk-LJII3FXI.js';
7
+ export { louvain } from './chunk-UMI2OMVB.js';
8
+ export { spinglass } from './chunk-XFXVWUL7.js';
9
+ import './chunk-KKDSRV3J.js';
9
10
  //# sourceMappingURL=index.js.map
10
11
  //# sourceMappingURL=index.js.map
package/dist/infomap.d.ts CHANGED
@@ -3,6 +3,6 @@ import { Graph, CommunityResult } from '@graphrs/core';
3
3
  interface InfomapOptions {
4
4
  trials?: number;
5
5
  }
6
- declare function infomap(graph: Graph, options?: InfomapOptions): Promise<CommunityResult>;
6
+ declare function infomap(graph: Graph, _options?: InfomapOptions): Promise<CommunityResult>;
7
7
 
8
8
  export { type InfomapOptions, infomap };
package/dist/infomap.js CHANGED
@@ -1,3 +1,4 @@
1
- export { infomap } from './chunk-ZHL6B6AX.js';
1
+ export { infomap } from './chunk-CCLSQDUH.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=infomap.js.map
3
4
  //# sourceMappingURL=infomap.js.map
@@ -3,6 +3,6 @@ import { Graph, CommunityResult } from '@graphrs/core';
3
3
  interface LabelPropagationOptions {
4
4
  fixed?: number[];
5
5
  }
6
- declare function labelPropagation(graph: Graph, options?: LabelPropagationOptions): Promise<CommunityResult>;
6
+ declare function labelPropagation(graph: Graph, _options?: LabelPropagationOptions): Promise<CommunityResult>;
7
7
 
8
8
  export { type LabelPropagationOptions, labelPropagation };
@@ -1,3 +1,4 @@
1
- export { labelPropagation } from './chunk-XO43IX2E.js';
1
+ export { labelPropagation } from './chunk-GBWM72ZE.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=label-propagation.js.map
3
4
  //# sourceMappingURL=label-propagation.js.map
package/dist/leiden.d.ts CHANGED
@@ -5,6 +5,6 @@ interface LeidenOptions {
5
5
  beta?: number;
6
6
  iterations?: number;
7
7
  }
8
- declare function leiden(graph: Graph, options?: LeidenOptions): Promise<CommunityResult>;
8
+ declare function leiden(graph: Graph, _options?: LeidenOptions): Promise<CommunityResult>;
9
9
 
10
10
  export { type LeidenOptions, leiden };
package/dist/leiden.js CHANGED
@@ -1,3 +1,4 @@
1
- export { leiden } from './chunk-YCRFRMTW.js';
1
+ export { leiden } from './chunk-LJII3FXI.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=leiden.js.map
3
4
  //# sourceMappingURL=leiden.js.map
package/dist/louvain.d.ts CHANGED
@@ -3,6 +3,6 @@ import { Graph, CommunityResult } from '@graphrs/core';
3
3
  interface LouvainOptions {
4
4
  resolution?: number;
5
5
  }
6
- declare function louvain(graph: Graph, options?: LouvainOptions): Promise<CommunityResult>;
6
+ declare function louvain(graph: Graph, _options?: LouvainOptions): Promise<CommunityResult>;
7
7
 
8
8
  export { type LouvainOptions, louvain };
package/dist/louvain.js CHANGED
@@ -1,3 +1,4 @@
1
- export { louvain } from './chunk-KW3VHOEA.js';
1
+ export { louvain } from './chunk-UMI2OMVB.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=louvain.js.map
3
4
  //# sourceMappingURL=louvain.js.map
@@ -4,6 +4,6 @@ interface SpinglassOptions {
4
4
  spins?: number;
5
5
  gamma?: number;
6
6
  }
7
- declare function spinglass(graph: Graph, options?: SpinglassOptions): Promise<CommunityResult>;
7
+ declare function spinglass(graph: Graph, _options?: SpinglassOptions): Promise<CommunityResult>;
8
8
 
9
9
  export { type SpinglassOptions, spinglass };
package/dist/spinglass.js CHANGED
@@ -1,3 +1,4 @@
1
- export { spinglass } from './chunk-JRRIBF6J.js';
1
+ export { spinglass } from './chunk-XFXVWUL7.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=spinglass.js.map
3
4
  //# sourceMappingURL=spinglass.js.map
@@ -3,6 +3,6 @@ import { Graph, CommunityResult } from '@graphrs/core';
3
3
  interface WalktrapOptions {
4
4
  steps?: number;
5
5
  }
6
- declare function walktrap(graph: Graph, options?: WalktrapOptions): Promise<CommunityResult>;
6
+ declare function walktrap(graph: Graph, _options?: WalktrapOptions): Promise<CommunityResult>;
7
7
 
8
8
  export { type WalktrapOptions, walktrap };
package/dist/walktrap.js CHANGED
@@ -1,3 +1,4 @@
1
- export { walktrap } from './chunk-ELA7RAJX.js';
1
+ export { walktrap } from './chunk-U557CCJV.js';
2
+ import './chunk-KKDSRV3J.js';
2
3
  //# sourceMappingURL=walktrap.js.map
3
4
  //# sourceMappingURL=walktrap.js.map
package/package.json CHANGED
@@ -1,73 +1,29 @@
1
1
  {
2
2
  "name": "@graphrs/community",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Community detection algorithms (Louvain, Leiden, Infomap, Walktrap, etc.) for @graphrs",
7
- "keywords": [
8
- "graph",
9
- "community-detection",
10
- "louvain",
11
- "leiden",
12
- "clustering"
13
- ],
7
+ "keywords": ["graph", "community-detection", "louvain", "leiden", "clustering"],
14
8
  "author": "Totoro-jam <moqiuchen66@gmail.com>",
15
9
  "homepage": "https://github.com/Totoro-jam/graphrs#readme",
16
- "bugs": {
17
- "url": "https://github.com/Totoro-jam/graphrs/issues"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/Totoro-jam/graphrs",
22
- "directory": "packages/community"
23
- },
10
+ "bugs": { "url": "https://github.com/Totoro-jam/graphrs/issues" },
11
+ "repository": { "type": "git", "url": "https://github.com/Totoro-jam/graphrs", "directory": "packages/community" },
24
12
  "sideEffects": false,
25
13
  "exports": {
26
- ".": {
27
- "types": "./dist/index.d.ts",
28
- "import": "./dist/index.js"
29
- },
30
- "./louvain": {
31
- "types": "./dist/louvain.d.ts",
32
- "import": "./dist/louvain.js"
33
- },
34
- "./leiden": {
35
- "types": "./dist/leiden.d.ts",
36
- "import": "./dist/leiden.js"
37
- },
38
- "./infomap": {
39
- "types": "./dist/infomap.d.ts",
40
- "import": "./dist/infomap.js"
41
- },
42
- "./label-propagation": {
43
- "types": "./dist/label-propagation.d.ts",
44
- "import": "./dist/label-propagation.js"
45
- },
46
- "./walktrap": {
47
- "types": "./dist/walktrap.d.ts",
48
- "import": "./dist/walktrap.js"
49
- },
50
- "./fast-greedy": {
51
- "types": "./dist/fast-greedy.d.ts",
52
- "import": "./dist/fast-greedy.js"
53
- },
54
- "./spinglass": {
55
- "types": "./dist/spinglass.d.ts",
56
- "import": "./dist/spinglass.js"
57
- },
58
- "./fluid": {
59
- "types": "./dist/fluid.d.ts",
60
- "import": "./dist/fluid.js"
61
- }
14
+ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
15
+ "./louvain": { "types": "./dist/louvain.d.ts", "import": "./dist/louvain.js" },
16
+ "./leiden": { "types": "./dist/leiden.d.ts", "import": "./dist/leiden.js" },
17
+ "./infomap": { "types": "./dist/infomap.d.ts", "import": "./dist/infomap.js" },
18
+ "./label-propagation": { "types": "./dist/label-propagation.d.ts", "import": "./dist/label-propagation.js" },
19
+ "./walktrap": { "types": "./dist/walktrap.d.ts", "import": "./dist/walktrap.js" },
20
+ "./fast-greedy": { "types": "./dist/fast-greedy.d.ts", "import": "./dist/fast-greedy.js" },
21
+ "./spinglass": { "types": "./dist/spinglass.d.ts", "import": "./dist/spinglass.js" },
22
+ "./fluid": { "types": "./dist/fluid.d.ts", "import": "./dist/fluid.js" }
62
23
  },
63
24
  "main": "./dist/index.js",
64
25
  "types": "./dist/index.d.ts",
65
- "files": [
66
- "dist"
67
- ],
68
- "peerDependencies": {
69
- "@graphrs/core": "^0.1.0"
70
- },
26
+ "files": ["dist"],
71
27
  "scripts": {
72
28
  "build": "tsup",
73
29
  "test": "vitest run --passWithNoTests",
@@ -75,5 +31,6 @@
75
31
  "lint": "tsc --noEmit",
76
32
  "typecheck": "tsc --noEmit",
77
33
  "clean": "rm -rf dist"
78
- }
79
- }
34
+ },
35
+ "peerDependencies": { "@graphrs/core": "workspace:^" }
36
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-present Totoro-jam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/walktrap.ts
4
- async function walktrap(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { walktrap };
11
- //# sourceMappingURL=chunk-ELA7RAJX.js.map
12
- //# sourceMappingURL=chunk-ELA7RAJX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/walktrap.ts"],"names":[],"mappings":";;;AAMA,eAAsB,QAAA,CAAS,OAAc,OAAA,EAAqD;AAChG,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-ELA7RAJX.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface WalktrapOptions {\n steps?: number;\n}\n\nexport async function walktrap(graph: Graph, options?: WalktrapOptions): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/spinglass.ts
4
- async function spinglass(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { spinglass };
11
- //# sourceMappingURL=chunk-JRRIBF6J.js.map
12
- //# sourceMappingURL=chunk-JRRIBF6J.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/spinglass.ts"],"names":[],"mappings":";;;AAOA,eAAsB,SAAA,CACpB,OACA,OAAA,EAC0B;AAC1B,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-JRRIBF6J.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface SpinglassOptions {\n spins?: number;\n gamma?: number;\n}\n\nexport async function spinglass(\n graph: Graph,\n options?: SpinglassOptions,\n): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,14 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/louvain.ts
4
- async function louvain(graph, options) {
5
- await getWasm();
6
- graph._getEdgePairs();
7
- graph._getWeights();
8
- options?.resolution ?? 1;
9
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
10
- }
11
-
12
- export { louvain };
13
- //# sourceMappingURL=chunk-KW3VHOEA.js.map
14
- //# sourceMappingURL=chunk-KW3VHOEA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/louvain.ts"],"names":[],"mappings":";;;AAMA,eAAsB,OAAA,CAAQ,OAAc,OAAA,EAAoD;AAC9F,EAAc,MAAM,OAAA;AACpB,EAAe,MAAM,aAAA;AACrB,EAAiB,MAAM,WAAA;AACvB,EAAoB,SAAS,UAAA,IAAc;AAK3C,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-KW3VHOEA.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface LouvainOptions {\n resolution?: number;\n}\n\nexport async function louvain(graph: Graph, options?: LouvainOptions): Promise<CommunityResult> {\n const _wasm = await getWasm();\n const _edges = graph._getEdgePairs();\n const _weights = graph._getWeights();\n const _resolution = options?.resolution ?? 1.0;\n void _wasm;\n void _edges;\n void _weights;\n void _resolution;\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/fluid.ts
4
- async function fluidCommunities(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { fluidCommunities };
11
- //# sourceMappingURL=chunk-P4RSJ7VG.js.map
12
- //# sourceMappingURL=chunk-P4RSJ7VG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/fluid.ts"],"names":[],"mappings":";;;AAMA,eAAsB,gBAAA,CACpB,OACA,OAAA,EAC0B;AAC1B,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-P4RSJ7VG.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface FluidOptions {\n numCommunities: number;\n}\n\nexport async function fluidCommunities(\n graph: Graph,\n options: FluidOptions,\n): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/fast-greedy.ts
4
- async function fastGreedy(graph) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { fastGreedy };
11
- //# sourceMappingURL=chunk-UYGT3LMM.js.map
12
- //# sourceMappingURL=chunk-UYGT3LMM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/fast-greedy.ts"],"names":[],"mappings":";;;AAEA,eAAsB,WAAW,KAAA,EAAwC;AACvE,EAAc,MAAM,OAAA;AAEpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-UYGT3LMM.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport async function fastGreedy(graph: Graph): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/label-propagation.ts
4
- async function labelPropagation(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { labelPropagation };
11
- //# sourceMappingURL=chunk-XO43IX2E.js.map
12
- //# sourceMappingURL=chunk-XO43IX2E.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/label-propagation.ts"],"names":[],"mappings":";;;AAMA,eAAsB,gBAAA,CACpB,OACA,OAAA,EAC0B;AAC1B,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-XO43IX2E.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface LabelPropagationOptions {\n fixed?: number[];\n}\n\nexport async function labelPropagation(\n graph: Graph,\n options?: LabelPropagationOptions,\n): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/leiden.ts
4
- async function leiden(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { leiden };
11
- //# sourceMappingURL=chunk-YCRFRMTW.js.map
12
- //# sourceMappingURL=chunk-YCRFRMTW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/leiden.ts"],"names":[],"mappings":";;;AAQA,eAAsB,MAAA,CAAO,OAAc,OAAA,EAAmD;AAC5F,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-YCRFRMTW.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface LeidenOptions {\n resolution?: number;\n beta?: number;\n iterations?: number;\n}\n\nexport async function leiden(graph: Graph, options?: LeidenOptions): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { getWasm } from '@graphrs/core';
2
-
3
- // src/infomap.ts
4
- async function infomap(graph, options) {
5
- await getWasm();
6
- void graph._getEdgePairs();
7
- throw new Error("Not yet implemented \u2014 WASM bindings pending");
8
- }
9
-
10
- export { infomap };
11
- //# sourceMappingURL=chunk-ZHL6B6AX.js.map
12
- //# sourceMappingURL=chunk-ZHL6B6AX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/infomap.ts"],"names":[],"mappings":";;;AAMA,eAAsB,OAAA,CAAQ,OAAc,OAAA,EAAoD;AAC9F,EAAc,MAAM,OAAA;AAGpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-ZHL6B6AX.js","sourcesContent":["import { getWasm, type Graph, type CommunityResult } from '@graphrs/core';\n\nexport interface InfomapOptions {\n trials?: number;\n}\n\nexport async function infomap(graph: Graph, options?: InfomapOptions): Promise<CommunityResult> {\n const _wasm = await getWasm();\n void _wasm;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}