@@ -56,7 +56,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
56
56
* @return {Array }
57
57
*/
58
58
59
- const maxWeightMatching = function ( edges , maxCardinality = false ) {
59
+ const maxWeightMatching = ( edges , maxCardinality = false ) => {
60
60
// Vertices are numbered 0 .. (nvertex-1).
61
61
// Non-trivial blossoms are numbered nvertex .. (2*nvertex-1)
62
62
//
@@ -215,7 +215,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
215
215
216
216
// Trace back from vertices v and w to discover either a new blossom
217
217
// or an augmenting path. Return the base vertex of the new blossom or -1.
218
- const scanBlossom = function ( v , w ) {
218
+ const scanBlossom = ( v , w ) => {
219
219
console . debug ( 'DEBUG: scanBlossom(' + v + ',' + w + ')' ) ;
220
220
// Trace back from v and w, placing breadcrumbs as we go.
221
221
const path = [ ] ;
@@ -263,7 +263,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
263
263
// Construct a new blossom with given base, containing edge k which
264
264
// connects a pair of S vertices. Label the new blossom as S; set its dual
265
265
// variable to zero; relabel its T-vertices to S and add them to the queue.
266
- const addBlossom = function ( base , k ) {
266
+ const addBlossom = ( base , k ) => {
267
267
let i ;
268
268
let v = edges [ k ] [ 0 ] ;
269
269
let w = edges [ k ] [ 1 ] ;
@@ -403,7 +403,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
403
403
} ;
404
404
405
405
// Expand the given top-level blossom.
406
- const expandBlossom = function ( b , endstage ) {
406
+ const expandBlossom = ( b , endstage ) => {
407
407
console . debug (
408
408
'DEBUG: expandBlossom(' + b + ',' + endstage + ') ' + blossomchilds [ b ]
409
409
) ;
@@ -527,7 +527,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
527
527
528
528
// Swap matched/unmatched edges over an alternating path through blossom b
529
529
// between vertex v and the base vertex. Keep blossom bookkeeping consistent.
530
- const augmentBlossom = function ( b , v ) {
530
+ const augmentBlossom = ( b , v ) => {
531
531
console . debug ( 'DEBUG: augmentBlossom(' + b + ',' + v + ')' ) ;
532
532
// Bubble up through the blossom tree from vertex v to an immediate
533
533
// sub-blossom of b.
@@ -591,7 +591,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
591
591
// Swap matched/unmatched edges over an alternating path between two
592
592
// single vertices. The augmenting path runs through edge k, which
593
593
// connects a pair of S vertices.
594
- const augmentMatching = function ( k ) {
594
+ const augmentMatching = ( k ) => {
595
595
const v = edges [ k ] [ 0 ] ;
596
596
const w = edges [ k ] [ 1 ] ;
597
597
0 commit comments