Skip to content

Commit 6f55d67

Browse files
upgrade to aureooms-node-package 1.0.0
1 parent b48f7bf commit 6f55d67

File tree

18 files changed

+767
-450
lines changed

18 files changed

+767
-450
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ build/Release
2323
# Deployed apps should consider commenting this line out:
2424
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
2525
node_modules
26+
27+
# groc
28+
doc

.groc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"glob": [
3+
"js/src/**/*.js",
4+
"README.md"
5+
],
6+
"github": true
7+
}

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: node_js
2+
node_js:
3+
- "0.11"
4+
- "0.10"
5+
# - "0.8"
6+
# - "0.6"
7+
install:
8+
- npm -d install
9+
script:
10+
- npm test
11+
after_success:
12+
- ./node_modules/.bin/coveralls < coverage/lcov.info || true
13+
- ./node_modules/.bin/codeclimate < coverage/lcov.info || true
14+
# env:
15+
# - COVERALLS_REPO_TOKEN=000000000000000000000000000000000
16+
# - CODECLIMATE_REPO_TOKEN=0000000000000000000000000000000000000000000000000000000000000000

LICENSE

Lines changed: 619 additions & 297 deletions
Large diffs are not rendered by default.

bower.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{
2-
"name": "gn",
3-
"version": "0.1.1",
4-
"description" : "gn (graphs and networks) algorithm / adt templates for JavaScript",
5-
"homepage": "https://github.com/aureooms/gn",
6-
"license": "GPL v2"
2+
"name": "aureooms-js-gn",
3+
"version": "0.1.1",
4+
"description" : "graphs and networks code bricks for JavaScript",
5+
"homepage": "https://aureooms.github.io/js-gn",
6+
"license": "AGPL-3.0",
7+
"main": "js/dist/gn.js",
8+
"ignore": [
9+
"js/index.js",
10+
"js/src",
11+
"test",
12+
"pkg.json",
13+
"package.json",
14+
".groc.json",
15+
".travis.yml",
16+
".gitignore",
17+
"README.md"
18+
]
719
}

js/build.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

js/dist/gn.js

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
(function(exports){
1+
(function(exports, undefined){
22

33
'use strict';
44

55

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 */
1111

1212

1313

@@ -41,7 +41,7 @@ var dup_t = function(){
4141

4242

4343
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 */
4545

4646

4747
var eventour_t = function(){
@@ -104,7 +104,7 @@ var eventour_t = function(){
104104
};
105105

106106
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 */
108108

109109

110110
var oddgraph_t = function(){
@@ -134,7 +134,7 @@ var oddgraph_t = function(){
134134
};
135135

136136
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 */
138138
//ajoute arretes de poids min et retire cycle
139139

140140

@@ -178,7 +178,7 @@ var simplegraph_t = function(){
178178
};
179179

180180
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 */
182182
// Adapted from http://jorisvr.nl/maximummatching.html
183183
// All credit for the implementation goes to Joris van Rantwijk [http://jorisvr.nl].
184184

@@ -911,7 +911,7 @@ var wblossom_n3_t = function (debug, CHECK_OPTIMUM, CHECK_DELTA) {
911911

912912
// Verify that the optimum solution has been reached.
913913
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;
915915
if (maxcardinality) {
916916
// Vertices may have negative dual;
917917
// 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) {
13331333

13341334

13351335
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 */
13371337
//
13381338
//
13391339
///**
@@ -1421,10 +1421,8 @@ exports.wblossom_n3_t = wblossom_n3_t;
14211421
//};
14221422
//
14231423
//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 */
14281426

14291427

14301428
var dijkstra_t = function(priority_queue_t){
@@ -1460,7 +1458,9 @@ var dijkstra_t = function(priority_queue_t){
14601458
dist[y[0]] = v;
14611459
prev[y[0]] = m[0];
14621460
}
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.
14641464
if(!busy[y[0]]){
14651465
left.push(y);
14661466
busy[y[0]] = true;
@@ -1478,7 +1478,8 @@ var dijkstra_t = function(priority_queue_t){
14781478

14791479

14801480
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 */
14821483

14831484

14841485
var floyd_t = function(){
@@ -1501,7 +1502,7 @@ var floyd_t = function(){
15011502
};
15021503

15031504
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 */
15051506

15061507

15071508
var sptreedfs_t = function(){
@@ -1533,8 +1534,8 @@ var sptreedfs_t = function(){
15331534
};
15341535

15351536
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 */
15381539

15391540

15401541
var amat_t = function(){
@@ -1554,7 +1555,7 @@ var amat_t = function(){
15541555
};
15551556

15561557
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 */
15581559

15591560

15601561
var copy_t = function(){
@@ -1577,7 +1578,7 @@ var copy_t = function(){
15771578
};
15781579

15791580
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 */
15811582

15821583

15831584
var d2s = function(g, h, V){
@@ -1595,7 +1596,7 @@ var d2s = function(g, h, V){
15951596
};
15961597

15971598
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 */
15991600

16001601

16011602
// var pmat_t = function(){
@@ -1615,7 +1616,7 @@ exports.d2s = d2s;
16151616
// };
16161617

16171618
// 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 */
16191620

16201621

16211622
// var smat_t = function(){
@@ -1635,7 +1636,7 @@ exports.d2s = d2s;
16351636
// };
16361637

16371638
// 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 */
16391640

16401641

16411642
var sqmat = function(d, n, v){
@@ -1652,9 +1653,9 @@ var sqmat = function(d, n, v){
16521653

16531654

16541655
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 */
16581659

16591660
var dense_graph_t = function(){
16601661

@@ -1779,8 +1780,14 @@ var dense_graph_t = function(){
17791780
};
17801781

17811782
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+
*/
17841791

17851792
var fuse_t = function(){
17861793

@@ -1838,7 +1845,15 @@ var fuse_t = function(){
18381845
};
18391846

18401847
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+
18421857
var index_t = function(){
18431858

18441859
var index = function(G, attr){
@@ -1899,7 +1914,8 @@ var index_t = function(){
18991914
};
19001915

19011916
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 */
19031919

19041920
// TODO should take a linked list prototype as template parameter
19051921
// in order to simplify the implementation and allow better

js/dist/gn.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)