@@ -1962,11 +1962,11 @@ var sparse_graph_t = function(){
1962
1962
/**
1963
1963
* Object constructor
1964
1964
*
1965
- *
1965
+ *
1966
1966
* The main entry points in the graph object are the two dummy nodes [beg] and [end].
1967
1967
* Those allow us to write more generic code by handling corner cases implicitly.
1968
1968
* They allow the addition of a single vertex to the graph in O(1).
1969
- * Remark : Indeed the behaviour we want to get is the behaviour of a dll (doubly linked list).
1969
+ * Remark : Indeed the behaviour we want to get is the behaviour of a dll (doubly linked list).
1970
1970
*
1971
1971
*
1972
1972
* vertices are small arrays where
@@ -1979,14 +1979,14 @@ var sparse_graph_t = function(){
1979
1979
* For the set vertices that have not been removed from the graph,
1980
1980
* we define the 'youngest' vertex as the most recently added vertex of this set
1981
1981
* and we define the 'oldest' vertex as the least recently added vertex of this set
1982
- *
1982
+ *
1983
1983
* Invariants
1984
1984
* ==
1985
1985
*
1986
1986
* Given the graph is not empty:
1987
1987
* > [end][1] = pred of end = the youngest vertex
1988
1988
* > [beg][2] = succ of beg = the oldest vertex
1989
- *
1989
+ *
1990
1990
* Given a vertex v
1991
1991
* > v[1][2] = succ of pred of v = v
1992
1992
* > v[2][1] = pred of succ of v = v
@@ -2007,11 +2007,11 @@ var sparse_graph_t = function(){
2007
2007
/**
2008
2008
* Prototype method to add a vertex to the graph with label h.
2009
2009
* <p>
2010
- * The graph is extended
2011
- * @param h is the label
2010
+ * The graph is extended
2011
+ * @param { label } h is the label
2012
2012
*/
2013
2013
2014
- graph . prototype . vadd = function ( h ) {
2014
+ graph . prototype . vadd = function ( h ) {
2015
2015
2016
2016
// First the vertex is created and appended at the end of the dll.
2017
2017
// Remember [end][1] was the previous last element
@@ -2033,7 +2033,7 @@ var sparse_graph_t = function(){
2033
2033
2034
2034
this . eitr ( i , function ( e ) { this . edel ( e ) ; } ) ;
2035
2035
2036
-
2036
+
2037
2037
i [ 1 ] [ 2 ] = i [ 2 ] ; // next of pref becomes next
2038
2038
i [ 2 ] [ 1 ] = i [ 1 ] ; // prev of next becomes prev
2039
2039
@@ -2120,7 +2120,7 @@ var sparse_graph_t = function(){
2120
2120
2121
2121
} ;
2122
2122
2123
-
2123
+
2124
2124
graph . prototype . aeend = function ( ) { return this . eend ; } ;
2125
2125
2126
2126
@@ -2130,4 +2130,5 @@ var sparse_graph_t = function(){
2130
2130
} ;
2131
2131
2132
2132
exports . sparse_graph_t = sparse_graph_t ;
2133
+
2133
2134
} ) ( typeof exports === 'undefined' ? this [ 'gn' ] = { } : exports ) ;
0 commit comments