Skip to content

Commit 15bab98

Browse files
😒 chore: Patch sources.
1 parent a62e499 commit 15bab98

25 files changed

+59
-48
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './undirected' ;

src/undirected/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './offline' ;
2+
export * from './online' ;

src/undirected/offline/algo/eulerian/dup.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33

4-
var dup_t = function(){
4+
export function dup_t(){
55

66
var dup = function(g, V, m, next, dist, e){
77

@@ -27,7 +27,6 @@ var dup_t = function(){
2727

2828
return dup;
2929

30-
};
30+
}
3131

3232

33-
exports.dup_t = dup_t;

src/undirected/offline/algo/eulerian/eventour.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var eventour_t = function () {
3+
export function eventour_t () {
44

55
/**
66
* @param {int} fjfj dkdj
@@ -76,6 +76,5 @@ var eventour_t = function () {
7676

7777
return eventour;
7878

79-
};
79+
}
8080

81-
exports.eventour_t = eventour_t;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export * from './dup' ;
2+
export * from './eventour' ;
3+
export * from './oddgraph' ;
4+
export * from './simplegraph' ;
5+
export * from './wblossom_n3' ;
6+
export * from './wblossom_n4' ;

src/undirected/offline/algo/eulerian/oddgraph.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var oddgraph_t = function(){
3+
export function oddgraph_t(){
44

55
var oddgraph = function(g, dist, h){
66

@@ -24,6 +24,5 @@ var oddgraph_t = function(){
2424

2525
return oddgraph;
2626

27-
};
27+
}
2828

29-
exports.oddgraph_t = oddgraph_t;

src/undirected/offline/algo/eulerian/simplegraph.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44

5-
var simplegraph_t = function(){
5+
export function simplegraph_t(){
66

77
var simplegraph = function(g, order, dist, h){
88
var V = [], i, j; // link between g and h
@@ -38,6 +38,5 @@ var simplegraph_t = function(){
3838

3939
return simplegraph;
4040

41-
};
41+
}
4242

43-
exports.simplegraph_t = simplegraph_t;

src/undirected/offline/algo/eulerian/wblossom_n3.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// to validate this new code.
1818

1919

20-
var wblossom_n3_t = function (debug, CHECK_OPTIMUM, CHECK_DELTA) {
20+
export function wblossom_n3_t (debug, CHECK_OPTIMUM, CHECK_DELTA) {
2121

2222
// If assigned, DEBUG(str) is called with lots of debug messages.
2323
var DEBUG = debug ? function(s){ console.log('DEBUG:', s); } : null;
@@ -1147,8 +1147,7 @@ var wblossom_n3_t = function (debug, CHECK_OPTIMUM, CHECK_DELTA) {
11471147
return maxWeightMatching;
11481148

11491149

1150-
};
1150+
}
11511151

11521152

11531153

1154-
exports.wblossom_n3_t = wblossom_n3_t;

src/undirected/offline/algo/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './eulerian' ;
2+
export * from './sp' ;
3+
export * from './util' ;

src/undirected/offline/algo/sp/dijkstra.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*/
2222

23-
var dijkstra = function ( g, order, source, prev, dist, used, ref, left ) {
23+
export function dijkstra ( g, order, source, prev, dist, used, ref, left ) {
2424

2525
var current;
2626

@@ -58,7 +58,6 @@ var dijkstra = function ( g, order, source, prev, dist, used, ref, left ) {
5858
});
5959
}
6060

61-
};
61+
}
6262

6363

64-
exports.dijkstra = dijkstra;

src/undirected/offline/algo/sp/floyd.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var floyd_t = function(){
3+
export function floyd_t(){
44

55
var floyd = function(order, dist){
66
var i, j, k;
@@ -17,6 +17,5 @@ var floyd_t = function(){
1717

1818
return floyd;
1919

20-
};
20+
}
2121

22-
exports.floyd_t = floyd_t;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './dijkstra' ;
2+
export * from './floyd' ;
3+
export * from './sptreedfs' ;

src/undirected/offline/algo/sp/sptreedfs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var sptreedfs_t = function(){
3+
export function sptreedfs_t(){
44

55
var dfs = function(g, next, dist, s, t){
66

@@ -26,6 +26,5 @@ var sptreedfs_t = function(){
2626

2727
return sptreedfs;
2828

29-
};
29+
}
3030

31-
exports.sptreedfs_t = sptreedfs_t;

src/undirected/offline/algo/util/amat.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var amat_t = function(){
3+
export function amat_t(){
44

55
var amat = function(g, order, dist){
66

@@ -14,6 +14,5 @@ var amat_t = function(){
1414

1515
return amat;
1616

17-
};
17+
}
1818

19-
exports.amat_t = amat_t;

src/undirected/offline/algo/util/copy.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var copy_t = function(){
3+
export function copy_t(){
44

55
var copy = function(g, h){
66

@@ -17,6 +17,5 @@ var copy_t = function(){
1717

1818
return copy;
1919

20-
};
20+
}
2121

22-
exports.copy_t = copy_t;

src/undirected/offline/algo/util/d2s.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var d2s = function(g, h, V){
3+
export function d2s(g, h, V){
44

55
g.vitr(function(v){
66
V[v[0]] = h.vadd(v[0]);
@@ -12,6 +12,5 @@ var d2s = function(g, h, V){
1212
});
1313
});
1414

15-
};
15+
}
1616

17-
exports.d2s = d2s;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export * from './amat' ;
2+
export * from './copy' ;
3+
export * from './d2s' ;
4+
export * from './pmat' ;
5+
export * from './smat' ;
6+
export * from './sqmat' ;
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
var sqmat = function(d, n, v){
3+
export function sqmat(d, n, v){
44

55
var i = n;
66
var m = new Array(i);
@@ -10,7 +10,6 @@ var sqmat = function(d, n, v){
1010

1111
return m;
1212

13-
};
13+
}
1414

1515

16-
exports.sqmat = sqmat;

src/undirected/offline/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './algo' ;

src/undirected/online/data/dense.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
var dense_graph_t = function(){
2+
export function dense_graph_t(){
33

44
var graph = function(){
55

@@ -119,6 +119,5 @@ var dense_graph_t = function(){
119119

120120
return graph;
121121

122-
};
122+
}
123123

124-
exports.dense_graph_t = dense_graph_t;

src/undirected/online/data/fuse.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* vertices in other fused graphs.
77
*/
88

9-
var fuse_t = function(){
9+
export function fuse_t(){
1010

1111
var fuse = function(){
1212

@@ -59,6 +59,5 @@ var fuse_t = function(){
5959

6060
return fuse;
6161

62-
};
62+
}
6363

64-
exports.fuse_t = fuse_t;

src/undirected/online/data/gindex.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77

8-
var index_t = function(){
8+
export function index_t(){
99

1010
var index = function(G, attr){
1111

@@ -62,6 +62,5 @@ var index_t = function(){
6262

6363
return index;
6464

65-
};
65+
}
6666

67-
exports.index_t = index_t;

src/undirected/online/data/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './dense' ;
2+
export * from './fuse' ;
3+
export * from './gindex' ;
4+
export * from './sparse' ;

src/undirected/online/data/sparse.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212

13-
var sparse_graph_t = function(){
13+
export function sparse_graph_t(){
1414

1515
/**
1616
* Object constructor
@@ -180,6 +180,5 @@ var sparse_graph_t = function(){
180180

181181
return graph;
182182

183-
};
183+
}
184184

185-
exports.sparse_graph_t = sparse_graph_t;

src/undirected/online/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './data' ;

0 commit comments

Comments
 (0)