Skip to content

Commit 05432e7

Browse files
⬆️ deps: Upgrade.
1 parent 15e966f commit 05432e7

File tree

7 files changed

+595
-1505
lines changed

7 files changed

+595
-1505
lines changed

package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,22 @@
6060
"test": "ava"
6161
},
6262
"dependencies": {
63-
"@aureooms/js-compare": "^2.0.0",
64-
"@aureooms/js-itertools": "^5.1.0",
65-
"@aureooms/js-pairing-heap": "^3.0.0"
63+
"@heap-data-structure/pairing-heap": "^4.0.0",
64+
"@iterable-iterator/list": "^1.0.1",
65+
"@iterable-iterator/map": "^1.0.1",
66+
"@iterable-iterator/reduce": "^1.0.1",
67+
"@iterable-iterator/slice": "^1.0.1",
68+
"@total-order/key": "^1.0.0",
69+
"@total-order/primitive": "^1.0.1"
6670
},
6771
"devDependencies": {
6872
"@babel/core": "7.14.8",
6973
"@babel/preset-env": "7.14.8",
7074
"@babel/register": "7.14.5",
7175
"@commitlint/cli": "12.1.4",
76+
"@iterable-iterator/sorted": "^1.0.0",
7277
"@js-library/commitlint-config": "0.0.4",
78+
"@total-order/lex": "^1.0.0",
7379
"ava": "3.15.0",
7480
"babel-plugin-transform-remove-console": "6.9.4",
7581
"babel-plugin-unassert": "3.1.0",

src/maxback/_contract.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {head} from '@aureooms/js-itertools';
1+
import {head} from '@iterable-iterator/slice';
22

33
/**
44
* Given G and some ordering, computes the graph H obtained from G by

src/maxback/_order.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import {attr, decreasing} from '@aureooms/js-compare';
2-
import {PairingHeap as Heap} from '@aureooms/js-pairing-heap';
1+
import {prop} from '@total-order/key';
2+
import {decreasing} from '@total-order/primitive';
3+
import {PairingHeap as Heap} from '@heap-data-structure/pairing-heap';
34

45
/**
56
* Lists the vertices of an undirected unweighted connected loopless multigraph
@@ -9,7 +10,7 @@ import {PairingHeap as Heap} from '@aureooms/js-pairing-heap';
910
* @returns {Iterable} The vertices of G in max-back order.
1011
*/
1112
export default function* _order(G) {
12-
const heap = new Heap(attr(decreasing, 'weight'));
13+
const heap = new Heap(prop(decreasing, 'weight'));
1314
const refs = new Map();
1415

1516
for (const v of G.keys()) refs.set(v, heap.push({weight: 0, vertex: v}));

src/maxback/_smallcuts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import {list, map} from '@aureooms/js-itertools';
1+
import {list} from '@iterable-iterator/list';
2+
import {map} from '@iterable-iterator/map';
23

34
import _order from './_order.js';
45
import _contract from './_contract.js';

src/maxback/mb.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import {min} from '@aureooms/js-itertools';
2-
import {attr, increasing} from '@aureooms/js-compare';
1+
import {min} from '@iterable-iterator/reduce';
2+
import {prop} from '@total-order/key';
3+
import {increasing} from '@total-order/primitive';
34

45
import _smallcuts from './_smallcuts.js';
56

@@ -10,5 +11,5 @@ import _smallcuts from './_smallcuts.js';
1011
* @returns {Array} A pair <code>[U,cutsize]</code> reprensenting a minimum cut of G.
1112
*/
1213
export default function mb(G) {
13-
return min(attr(increasing, 1), _smallcuts(G), undefined);
14+
return min(prop(increasing, 1), _smallcuts(G), undefined);
1415
}

test/src/mincut.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import test from 'ava';
2-
import {map, sorted} from '@aureooms/js-itertools';
3-
import {increasing, fixedlexicographical} from '@aureooms/js-compare';
2+
import {map} from '@iterable-iterator/map';
3+
import {sorted} from '@iterable-iterator/sorted';
4+
import {increasing} from '@total-order/primitive';
5+
import {fixedlexicographical} from '@total-order/lex';
46
import {mincut} from '../../src/index.js';
57

68
function order(edge) {

0 commit comments

Comments
 (0)