@graphrs/flow 0.0.0-canary.4aee852
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-OBZGP47R.js +22 -0
- package/dist/chunk-OBZGP47R.js.map +1 -0
- package/dist/chunk-OWHZXLI2.js +12 -0
- package/dist/chunk-OWHZXLI2.js.map +1 -0
- package/dist/chunk-VBVHPYJK.js +12 -0
- package/dist/chunk-VBVHPYJK.js.map +1 -0
- package/dist/connectivity.d.ts +7 -0
- package/dist/connectivity.js +3 -0
- package/dist/connectivity.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/max-flow.d.ts +8 -0
- package/dist/max-flow.js +3 -0
- package/dist/max-flow.js.map +1 -0
- package/dist/min-cut.d.ts +10 -0
- package/dist/min-cut.js +3 -0
- package/dist/min-cut.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getWasm } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
// src/connectivity.ts
|
|
4
|
+
async function vertexConnectivity(graph, source, target) {
|
|
5
|
+
await getWasm();
|
|
6
|
+
void graph._getEdgePairs();
|
|
7
|
+
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
8
|
+
}
|
|
9
|
+
async function edgeConnectivity(graph) {
|
|
10
|
+
await getWasm();
|
|
11
|
+
void graph._getEdgePairs();
|
|
12
|
+
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
13
|
+
}
|
|
14
|
+
async function isConnected(graph) {
|
|
15
|
+
await getWasm();
|
|
16
|
+
void graph._getEdgePairs();
|
|
17
|
+
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { edgeConnectivity, isConnected, vertexConnectivity };
|
|
21
|
+
//# sourceMappingURL=chunk-OBZGP47R.js.map
|
|
22
|
+
//# sourceMappingURL=chunk-OBZGP47R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/connectivity.ts"],"names":[],"mappings":";;;AAEA,eAAsB,kBAAA,CACpB,KAAA,EACA,MAAA,EACA,MAAA,EACiB;AACjB,EAAc,MAAM,OAAA;AAIpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,iBAAiB,KAAA,EAA+B;AACpE,EAAc,MAAM,OAAA;AAEpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D;AACA,eAAsB,YAAY,KAAA,EAAgC;AAChE,EAAc,MAAM,OAAA;AAEpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-OBZGP47R.js","sourcesContent":["import { getWasm, type Graph } from '@graphrs/core';\n\nexport async function vertexConnectivity(\n graph: Graph,\n source?: number,\n target?: number,\n): Promise<number> {\n const _wasm = await getWasm();\n void _wasm;\n void source;\n void target;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function edgeConnectivity(graph: Graph): Promise<number> {\n const _wasm = await getWasm();\n void _wasm;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\nexport async function isConnected(graph: Graph): Promise<boolean> {\n const _wasm = await getWasm();\n void _wasm;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getWasm } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
// src/max-flow.ts
|
|
4
|
+
async function maxFlow(graph, source, target, options) {
|
|
5
|
+
await getWasm();
|
|
6
|
+
void graph._getEdgePairs();
|
|
7
|
+
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { maxFlow };
|
|
11
|
+
//# sourceMappingURL=chunk-OWHZXLI2.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-OWHZXLI2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/max-flow.ts"],"names":[],"mappings":";;;AAMA,eAAsB,OAAA,CACpB,KAAA,EACA,MAAA,EACA,MAAA,EACA,OAAA,EACqB;AACrB,EAAc,MAAM,OAAA;AAKpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-OWHZXLI2.js","sourcesContent":["import { getWasm, type Graph, type FlowResult } from '@graphrs/core';\n\nexport interface MaxFlowOptions {\n algorithm?: 'ford-fulkerson' | 'push-relabel';\n}\n\nexport async function maxFlow(\n graph: Graph,\n source: number,\n target: number,\n options?: MaxFlowOptions,\n): Promise<FlowResult> {\n const _wasm = await getWasm();\n void _wasm;\n void source;\n void target;\n void options;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getWasm } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
// src/min-cut.ts
|
|
4
|
+
async function minCut(graph, source, target) {
|
|
5
|
+
await getWasm();
|
|
6
|
+
void graph._getEdgePairs();
|
|
7
|
+
throw new Error("Not yet implemented \u2014 WASM bindings pending");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { minCut };
|
|
11
|
+
//# sourceMappingURL=chunk-VBVHPYJK.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-VBVHPYJK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/min-cut.ts"],"names":[],"mappings":";;;AAQA,eAAsB,MAAA,CAAO,KAAA,EAAc,MAAA,EAAgB,MAAA,EAAuC;AAChG,EAAc,MAAM,OAAA;AAIpB,EAAA,KAAK,MAAM,aAAA,EAAc;AACzB,EAAA,MAAM,IAAI,MAAM,kDAA6C,CAAA;AAC/D","file":"chunk-VBVHPYJK.js","sourcesContent":["import { getWasm, type Graph } from '@graphrs/core';\n\nexport interface MinCutResult {\n value: number;\n partition: [number[], number[]];\n cutEdges: [number, number][];\n}\n\nexport async function minCut(graph: Graph, source: number, target: number): Promise<MinCutResult> {\n const _wasm = await getWasm();\n void _wasm;\n void source;\n void target;\n void graph._getEdgePairs();\n throw new Error('Not yet implemented — WASM bindings pending');\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Graph } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
declare function vertexConnectivity(graph: Graph, source?: number, target?: number): Promise<number>;
|
|
4
|
+
declare function edgeConnectivity(graph: Graph): Promise<number>;
|
|
5
|
+
declare function isConnected(graph: Graph): Promise<boolean>;
|
|
6
|
+
|
|
7
|
+
export { edgeConnectivity, isConnected, vertexConnectivity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"connectivity.js"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Graph, FlowResult } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
interface MaxFlowOptions {
|
|
4
|
+
algorithm?: 'ford-fulkerson' | 'push-relabel';
|
|
5
|
+
}
|
|
6
|
+
declare function maxFlow(graph: Graph, source: number, target: number, options?: MaxFlowOptions): Promise<FlowResult>;
|
|
7
|
+
|
|
8
|
+
export { type MaxFlowOptions, maxFlow };
|
package/dist/max-flow.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"max-flow.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Graph } from '@graphrs/core';
|
|
2
|
+
|
|
3
|
+
interface MinCutResult {
|
|
4
|
+
value: number;
|
|
5
|
+
partition: [number[], number[]];
|
|
6
|
+
cutEdges: [number, number][];
|
|
7
|
+
}
|
|
8
|
+
declare function minCut(graph: Graph, source: number, target: number): Promise<MinCutResult>;
|
|
9
|
+
|
|
10
|
+
export { type MinCutResult, minCut };
|
package/dist/min-cut.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"min-cut.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@graphrs/flow",
|
|
3
|
+
"version": "0.0.0-canary.4aee852",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Network flow and connectivity algorithms (max-flow, min-cut) for @graphrs",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"graph",
|
|
9
|
+
"max-flow",
|
|
10
|
+
"min-cut",
|
|
11
|
+
"connectivity",
|
|
12
|
+
"network-flow"
|
|
13
|
+
],
|
|
14
|
+
"author": "Totoro-jam <moqiuchen66@gmail.com>",
|
|
15
|
+
"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/flow"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./max-flow": {
|
|
31
|
+
"types": "./dist/max-flow.d.ts",
|
|
32
|
+
"import": "./dist/max-flow.js"
|
|
33
|
+
},
|
|
34
|
+
"./min-cut": {
|
|
35
|
+
"types": "./dist/min-cut.d.ts",
|
|
36
|
+
"import": "./dist/min-cut.js"
|
|
37
|
+
},
|
|
38
|
+
"./connectivity": {
|
|
39
|
+
"types": "./dist/connectivity.d.ts",
|
|
40
|
+
"import": "./dist/connectivity.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"main": "./dist/index.js",
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsup",
|
|
50
|
+
"test": "vitest run --passWithNoTests",
|
|
51
|
+
"test:ci": "vitest run --reporter=default --passWithNoTests",
|
|
52
|
+
"lint": "tsc --noEmit",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"clean": "rm -rf dist"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@graphrs/core": "workspace:^"
|
|
58
|
+
}
|
|
59
|
+
}
|