Skip to content

Commit 8c7383b

Browse files
🎨 style(blossom): Use arrow notation.
1 parent 780dcba commit 8c7383b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/core/blossom/blossom.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
5656
* @return {Array}
5757
*/
5858

59-
const maxWeightMatching = function (edges, maxCardinality = false) {
59+
const maxWeightMatching = (edges, maxCardinality = false) => {
6060
// Vertices are numbered 0 .. (nvertex-1).
6161
// Non-trivial blossoms are numbered nvertex .. (2*nvertex-1)
6262
//
@@ -215,7 +215,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
215215

216216
// Trace back from vertices v and w to discover either a new blossom
217217
// 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) => {
219219
console.debug('DEBUG: scanBlossom(' + v + ',' + w + ')');
220220
// Trace back from v and w, placing breadcrumbs as we go.
221221
const path = [];
@@ -263,7 +263,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
263263
// Construct a new blossom with given base, containing edge k which
264264
// connects a pair of S vertices. Label the new blossom as S; set its dual
265265
// 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) => {
267267
let i;
268268
let v = edges[k][0];
269269
let w = edges[k][1];
@@ -403,7 +403,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
403403
};
404404

405405
// Expand the given top-level blossom.
406-
const expandBlossom = function (b, endstage) {
406+
const expandBlossom = (b, endstage) => {
407407
console.debug(
408408
'DEBUG: expandBlossom(' + b + ',' + endstage + ') ' + blossomchilds[b]
409409
);
@@ -527,7 +527,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
527527

528528
// Swap matched/unmatched edges over an alternating path through blossom b
529529
// between vertex v and the base vertex. Keep blossom bookkeeping consistent.
530-
const augmentBlossom = function (b, v) {
530+
const augmentBlossom = (b, v) => {
531531
console.debug('DEBUG: augmentBlossom(' + b + ',' + v + ')');
532532
// Bubble up through the blossom tree from vertex v to an immediate
533533
// sub-blossom of b.
@@ -591,7 +591,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
591591
// Swap matched/unmatched edges over an alternating path between two
592592
// single vertices. The augmenting path runs through edge k, which
593593
// connects a pair of S vertices.
594-
const augmentMatching = function (k) {
594+
const augmentMatching = (k) => {
595595
const v = edges[k][0];
596596
const w = edges[k][1];
597597

0 commit comments

Comments
 (0)