Skip to content

Commit

Permalink
🎨 style(blossom): Use arrow notation.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Sep 24, 2020
1 parent 780dcba commit 8c7383b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/blossom/blossom.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
* @return {Array}
*/

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

// Trace back from vertices v and w to discover either a new blossom
// or an augmenting path. Return the base vertex of the new blossom or -1.
const scanBlossom = function (v, w) {
const scanBlossom = (v, w) => {
console.debug('DEBUG: scanBlossom(' + v + ',' + w + ')');
// Trace back from v and w, placing breadcrumbs as we go.
const path = [];
Expand Down Expand Up @@ -263,7 +263,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
// Construct a new blossom with given base, containing edge k which
// connects a pair of S vertices. Label the new blossom as S; set its dual
// variable to zero; relabel its T-vertices to S and add them to the queue.
const addBlossom = function (base, k) {
const addBlossom = (base, k) => {
let i;
let v = edges[k][0];
let w = edges[k][1];
Expand Down Expand Up @@ -403,7 +403,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
};

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

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

Expand Down

0 comments on commit 8c7383b

Please sign in to comment.