Skip to content

Commit d9ab722

Browse files
style
1 parent a3101a9 commit d9ab722

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

js/src/001 undirected/online/data/sparse.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ var sparse_graph_t = function(){
1515
/**
1616
* Object constructor
1717
*
18-
*
18+
*
1919
* The main entry points in the graph object are the two dummy nodes [beg] and [end].
2020
* Those allow us to write more generic code by handling corner cases implicitly.
2121
* They allow the addition of a single vertex to the graph in O(1).
22-
* Remark : Indeed the behaviour we want to get is the behaviour of a dll (doubly linked list).
22+
* Remark : Indeed the behaviour we want to get is the behaviour of a dll (doubly linked list).
2323
*
2424
*
2525
* vertices are small arrays where
@@ -32,14 +32,14 @@ var sparse_graph_t = function(){
3232
* For the set vertices that have not been removed from the graph,
3333
* we define the 'youngest' vertex as the most recently added vertex of this set
3434
* and we define the 'oldest' vertex as the least recently added vertex of this set
35-
*
35+
*
3636
* Invariants
3737
* ==
3838
*
3939
* Given the graph is not empty:
4040
* > [end][1] = pred of end = the youngest vertex
4141
* > [beg][2] = succ of beg = the oldest vertex
42-
*
42+
*
4343
* Given a vertex v
4444
* > v[1][2] = succ of pred of v = v
4545
* > v[2][1] = pred of succ of v = v
@@ -60,11 +60,11 @@ var sparse_graph_t = function(){
6060
/**
6161
* Prototype method to add a vertex to the graph with label h.
6262
* <p>
63-
* The graph is extended
64-
* @param h is the label
63+
* The graph is extended
64+
* @param {label} h is the label
6565
*/
6666

67-
graph.prototype.vadd = function(h){
67+
graph.prototype.vadd = function ( h ) {
6868

6969
// First the vertex is created and appended at the end of the dll.
7070
// Remember [end][1] was the previous last element
@@ -86,7 +86,7 @@ var sparse_graph_t = function(){
8686

8787
this.eitr(i, function(e) { this.edel(e); });
8888

89-
89+
9090
i[1][2] = i[2]; // next of pref becomes next
9191
i[2][1] = i[1]; // prev of next becomes prev
9292

@@ -173,7 +173,7 @@ var sparse_graph_t = function(){
173173

174174
};
175175

176-
176+
177177
graph.prototype.aeend = function(){ return this.eend; };
178178

179179

@@ -182,4 +182,4 @@ var sparse_graph_t = function(){
182182

183183
};
184184

185-
exports.sparse_graph_t = sparse_graph_t;
185+
exports.sparse_graph_t = sparse_graph_t;

0 commit comments

Comments
 (0)