1
- ( function ( exports ) {
1
+ ( function ( exports , undefined ) {
2
2
3
3
'use strict' ;
4
4
5
5
6
- /* /home/genius/Bureau/gn/ js/src/001 undirected */
7
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline */
8
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo */
9
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian */
10
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/dup.js */
6
+ /* js/src/001 undirected */
7
+ /* js/src/001 undirected/offline */
8
+ /* js/src/001 undirected/offline/algo */
9
+ /* js/src/001 undirected/offline/algo/eulerian */
10
+ /* js/src/001 undirected/offline/algo/eulerian/dup.js */
11
11
12
12
13
13
@@ -41,7 +41,7 @@ var dup_t = function(){
41
41
42
42
43
43
exports . dup_t = dup_t ;
44
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/eventour.js */
44
+ /* js/src/001 undirected/offline/algo/eulerian/eventour.js */
45
45
46
46
47
47
var eventour_t = function ( ) {
@@ -104,7 +104,7 @@ var eventour_t = function(){
104
104
} ;
105
105
106
106
exports . eventour_t = eventour_t ;
107
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/oddgraph.js */
107
+ /* js/src/001 undirected/offline/algo/eulerian/oddgraph.js */
108
108
109
109
110
110
var oddgraph_t = function ( ) {
@@ -134,7 +134,7 @@ var oddgraph_t = function(){
134
134
} ;
135
135
136
136
exports . oddgraph_t = oddgraph_t ;
137
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/simplegraph.js */
137
+ /* js/src/001 undirected/offline/algo/eulerian/simplegraph.js */
138
138
//ajoute arretes de poids min et retire cycle
139
139
140
140
@@ -178,7 +178,7 @@ var simplegraph_t = function(){
178
178
} ;
179
179
180
180
exports . simplegraph_t = simplegraph_t ;
181
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/wblossom_n3.js */
181
+ /* js/src/001 undirected/offline/algo/eulerian/wblossom_n3.js */
182
182
// Adapted from http://jorisvr.nl/maximummatching.html
183
183
// All credit for the implementation goes to Joris van Rantwijk [http://jorisvr.nl].
184
184
@@ -911,7 +911,7 @@ var wblossom_n3_t = function (debug, CHECK_OPTIMUM, CHECK_DELTA) {
911
911
912
912
// Verify that the optimum solution has been reached.
913
913
var verifyOptimum = function ( ) {
914
- var i , j , wt , v , b , p , k , s , vdualoffset ;
914
+ var i , j , wt , v , b , p , k , s , vdualoffset , iblossoms , jblossoms ;
915
915
if ( maxcardinality ) {
916
916
// Vertices may have negative dual;
917
917
// find a constant non-negative number to add to all vertex duals.
@@ -1333,7 +1333,7 @@ var wblossom_n3_t = function (debug, CHECK_OPTIMUM, CHECK_DELTA) {
1333
1333
1334
1334
1335
1335
exports . wblossom_n3_t = wblossom_n3_t ;
1336
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/eulerian/wblossom_n4.js */
1336
+ /* js/src/001 undirected/offline/algo/eulerian/wblossom_n4.js */
1337
1337
//
1338
1338
//
1339
1339
///**
@@ -1421,10 +1421,8 @@ exports.wblossom_n3_t = wblossom_n3_t;
1421
1421
//};
1422
1422
//
1423
1423
//exports.wblossom_n4_t = wblossom_n4_t;
1424
- /* /home/genius/Bureau/gn/js/src/001 undirected/offline/algo/hamiltonian */
1425
- /* /home/genius/Bureau/gn/js/src/001 undirected/offline/algo/mst */
1426
- /* /home/genius/Bureau/gn/js/src/001 undirected/offline/algo/sp */
1427
- /* /home/genius/Bureau/gn/js/src/001 undirected/offline/algo/sp/dijkstra.js */
1424
+ /* js/src/001 undirected/offline/algo/sp */
1425
+ /* js/src/001 undirected/offline/algo/sp/dijkstra.js */
1428
1426
1429
1427
1430
1428
var dijkstra_t = function ( priority_queue_t ) {
@@ -1460,7 +1458,9 @@ var dijkstra_t = function(priority_queue_t){
1460
1458
dist [ y [ 0 ] ] = v ;
1461
1459
prev [ y [ 0 ] ] = m [ 0 ] ;
1462
1460
}
1463
-
1461
+ // /!\ FLAWED : if updated element y already in the queue
1462
+ // the priority queue doesn't guarantee that the predicate will hold
1463
+ // true --> should use a pq allowing updating operations.
1464
1464
if ( ! busy [ y [ 0 ] ] ) {
1465
1465
left . push ( y ) ;
1466
1466
busy [ y [ 0 ] ] = true ;
@@ -1478,7 +1478,8 @@ var dijkstra_t = function(priority_queue_t){
1478
1478
1479
1479
1480
1480
exports . dijkstra_t = dijkstra_t ;
1481
- /* /home/genius/Bureau/gn/js/src/001 undirected/offline/algo/sp/floyd.js */
1481
+
1482
+ /* js/src/001 undirected/offline/algo/sp/floyd.js */
1482
1483
1483
1484
1484
1485
var floyd_t = function ( ) {
@@ -1501,7 +1502,7 @@ var floyd_t = function(){
1501
1502
} ;
1502
1503
1503
1504
exports . floyd_t = floyd_t ;
1504
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/sp/sptreedfs.js */
1505
+ /* js/src/001 undirected/offline/algo/sp/sptreedfs.js */
1505
1506
1506
1507
1507
1508
var sptreedfs_t = function ( ) {
@@ -1533,8 +1534,8 @@ var sptreedfs_t = function(){
1533
1534
} ;
1534
1535
1535
1536
exports . sptreedfs_t = sptreedfs_t ;
1536
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util */
1537
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/amat.js */
1537
+ /* js/src/001 undirected/offline/algo/util */
1538
+ /* js/src/001 undirected/offline/algo/util/amat.js */
1538
1539
1539
1540
1540
1541
var amat_t = function ( ) {
@@ -1554,7 +1555,7 @@ var amat_t = function(){
1554
1555
} ;
1555
1556
1556
1557
exports . amat_t = amat_t ;
1557
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/copy.js */
1558
+ /* js/src/001 undirected/offline/algo/util/copy.js */
1558
1559
1559
1560
1560
1561
var copy_t = function ( ) {
@@ -1577,7 +1578,7 @@ var copy_t = function(){
1577
1578
} ;
1578
1579
1579
1580
exports . copy_t = copy_t ;
1580
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/d2s.js */
1581
+ /* js/src/001 undirected/offline/algo/util/d2s.js */
1581
1582
1582
1583
1583
1584
var d2s = function ( g , h , V ) {
@@ -1595,7 +1596,7 @@ var d2s = function(g, h, V){
1595
1596
} ;
1596
1597
1597
1598
exports . d2s = d2s ;
1598
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/pmat.js */
1599
+ /* js/src/001 undirected/offline/algo/util/pmat.js */
1599
1600
1600
1601
1601
1602
// var pmat_t = function(){
@@ -1615,7 +1616,7 @@ exports.d2s = d2s;
1615
1616
// };
1616
1617
1617
1618
// exports.pmat_t = pmat_t;
1618
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/smat.js */
1619
+ /* js/src/001 undirected/offline/algo/util/smat.js */
1619
1620
1620
1621
1621
1622
// var smat_t = function(){
@@ -1635,7 +1636,7 @@ exports.d2s = d2s;
1635
1636
// };
1636
1637
1637
1638
// exports.smat_t = smat_t;
1638
- /* /home/genius/Bureau/gn/ js/src/001 undirected/offline/algo/util/sqmat.js */
1639
+ /* js/src/001 undirected/offline/algo/util/sqmat.js */
1639
1640
1640
1641
1641
1642
var sqmat = function ( d , n , v ) {
@@ -1652,9 +1653,9 @@ var sqmat = function(d, n, v){
1652
1653
1653
1654
1654
1655
exports . sqmat = sqmat ;
1655
- /* /home/genius/Bureau/gn/ js/src/001 undirected/online */
1656
- /* /home/genius/Bureau/gn/ js/src/001 undirected/online/data */
1657
- /* /home/genius/Bureau/gn/ js/src/001 undirected/online/data/dense.js */
1656
+ /* js/src/001 undirected/online */
1657
+ /* js/src/001 undirected/online/data */
1658
+ /* js/src/001 undirected/online/data/dense.js */
1658
1659
1659
1660
var dense_graph_t = function ( ) {
1660
1661
@@ -1779,8 +1780,14 @@ var dense_graph_t = function(){
1779
1780
} ;
1780
1781
1781
1782
exports . dense_graph_t = dense_graph_t ;
1782
- /* /home/genius/Bureau/gn/js/src/001 undirected/online/data/fuse.js */
1783
-
1783
+ /* js/src/001 undirected/online/data/fuse.js */
1784
+ /**
1785
+ * Fuse multiple graph data structure allowing to
1786
+ * repeat the same write operations on all of them.
1787
+ * Adds a pt member to all edges and vertices of each
1788
+ * graph allowing direct reference of twin edges and
1789
+ * vertices in other fused graphs.
1790
+ */
1784
1791
1785
1792
var fuse_t = function ( ) {
1786
1793
@@ -1838,7 +1845,15 @@ var fuse_t = function(){
1838
1845
} ;
1839
1846
1840
1847
exports . fuse_t = fuse_t ;
1841
- /* /home/genius/Bureau/gn/js/src/001 undirected/online/data/gindex.js */
1848
+
1849
+ /* js/src/001 undirected/online/data/gindex.js */
1850
+ /**
1851
+ * Sparse graph wrapper indexing vertices allowing
1852
+ * direct reference to a matrix (dense) structure.
1853
+ *
1854
+ */
1855
+
1856
+
1842
1857
var index_t = function ( ) {
1843
1858
1844
1859
var index = function ( G , attr ) {
@@ -1899,7 +1914,8 @@ var index_t = function(){
1899
1914
} ;
1900
1915
1901
1916
exports . index_t = index_t ;
1902
- /* /home/genius/Bureau/gn/js/src/001 undirected/online/data/sparse.js */
1917
+
1918
+ /* js/src/001 undirected/online/data/sparse.js */
1903
1919
1904
1920
// TODO should take a linked list prototype as template parameter
1905
1921
// in order to simplify the implementation and allow better
0 commit comments