diff --git a/src/cardinality/approx/bipartite.js b/src/cardinality/approx/bipartite.js index c86c194..8b6445d 100644 --- a/src/cardinality/approx/bipartite.js +++ b/src/cardinality/approx/bipartite.js @@ -1,3 +1,3 @@ -import general from './general'; +import general from "./general.js"; export default general; diff --git a/src/cardinality/approx/general.js b/src/cardinality/approx/general.js index 83115ca..4402dbf 100644 --- a/src/cardinality/approx/general.js +++ b/src/cardinality/approx/general.js @@ -1,4 +1,4 @@ -import general from '../opt/general'; +import general from "../opt/general.js"; const generalApprox = (edges, _eps) => general(edges); export default generalApprox; diff --git a/src/cardinality/approx/index.js b/src/cardinality/approx/index.js index 70a0b1b..8127fc9 100644 --- a/src/cardinality/approx/index.js +++ b/src/cardinality/approx/index.js @@ -1,5 +1,5 @@ -import bipartite from './bipartite'; -import general from './general'; +import bipartite from "./bipartite.js"; +import general from "./general.js"; export default general; diff --git a/src/cardinality/index.js b/src/cardinality/index.js index 837ad3f..f5f3f15 100644 --- a/src/cardinality/index.js +++ b/src/cardinality/index.js @@ -1,5 +1,5 @@ -import approx from './approx'; -import opt from './opt'; +import approx from "./approx/index.js"; +import opt from "./opt/index.js"; export default opt; diff --git a/src/cardinality/opt/bipartite.js b/src/cardinality/opt/bipartite.js index c86c194..8b6445d 100644 --- a/src/cardinality/opt/bipartite.js +++ b/src/cardinality/opt/bipartite.js @@ -1,3 +1,3 @@ -import general from './general'; +import general from "./general.js"; export default general; diff --git a/src/cardinality/opt/general.js b/src/cardinality/opt/general.js index 0d39c92..7aece4c 100644 --- a/src/cardinality/opt/general.js +++ b/src/cardinality/opt/general.js @@ -1,5 +1,5 @@ -import blossomNoChecks from '../../core/blossomNoChecks'; -import addDefaultWeight from '../../addDefaultWeight'; +import blossomNoChecks from "../../core/blossomNoChecks.js"; +import addDefaultWeight from "../../addDefaultWeight.js"; const general = (edges) => blossomNoChecks(addDefaultWeight(edges), true); diff --git a/src/cardinality/opt/index.js b/src/cardinality/opt/index.js index 70a0b1b..8127fc9 100644 --- a/src/cardinality/opt/index.js +++ b/src/cardinality/opt/index.js @@ -1,5 +1,5 @@ -import bipartite from './bipartite'; -import general from './general'; +import bipartite from "./bipartite.js"; +import general from "./general.js"; export default general; diff --git a/src/core/blossom/blossom.js b/src/core/blossom/blossom.js index 35643da..750299e 100644 --- a/src/core/blossom/blossom.js +++ b/src/core/blossom/blossom.js @@ -1,14 +1,14 @@ import assert from 'assert'; -import min from './min'; -import rotate from './rotate'; -import verifyOptimum from './verifyOptimum'; -import checkDelta2 from './checkDelta2'; -import checkDelta3 from './checkDelta3'; -import statistics from './statistics'; -import endpoints from './endpoints'; -import neighbours from './neighbours'; -import blossomLeaves from './blossomLeaves'; -import blossomEdges from './blossomEdges'; +import min from "./min.js"; +import rotate from "./rotate.js"; +import verifyOptimum from "./verifyOptimum.js"; +import checkDelta2 from "./checkDelta2.js"; +import checkDelta3 from "./checkDelta3.js"; +import statistics from "./statistics.js"; +import endpoints from "./endpoints.js"; +import neighbours from "./neighbours.js"; +import blossomLeaves from "./blossomLeaves.js"; +import blossomEdges from "./blossomEdges.js"; // Adapted from http://jorisvr.nl/maximummatching.html // All credit for the implementation goes to Joris van Rantwijk [http://jorisvr.nl]. diff --git a/src/core/blossom/blossomEdges.js b/src/core/blossom/blossomEdges.js index 2aeb80c..257249b 100644 --- a/src/core/blossom/blossomEdges.js +++ b/src/core/blossom/blossomEdges.js @@ -1,4 +1,4 @@ -import blossomLeaves from './blossomLeaves'; +import blossomLeaves from "./blossomLeaves.js"; export default function* blossomEdges(nvertex, blossomchilds, neighbend, bv) { for (const v of blossomLeaves(nvertex, blossomchilds, bv)) { diff --git a/src/core/blossom/checkDelta3.js b/src/core/blossom/checkDelta3.js index 5950e22..7b55d98 100644 --- a/src/core/blossom/checkDelta3.js +++ b/src/core/blossom/checkDelta3.js @@ -1,5 +1,5 @@ import assert from 'assert'; -import blossomLeaves from './blossomLeaves'; +import blossomLeaves from "./blossomLeaves.js"; // Check optimized delta3 against a trivial computation. const checkDelta3 = ({ diff --git a/src/core/blossom/index.js b/src/core/blossom/index.js index 0b14e94..8fa8517 100644 --- a/src/core/blossom/index.js +++ b/src/core/blossom/index.js @@ -1,9 +1,9 @@ -import blossom from './blossom'; -import checkDelta2 from './checkDelta2'; -import checkDelta3 from './checkDelta3'; -import min from './min'; -import rotate from './rotate'; -import verifyOptimum from './verifyOptimum'; +import blossom from "./blossom.js"; +import checkDelta2 from "./checkDelta2.js"; +import checkDelta3 from "./checkDelta3.js"; +import min from "./min.js"; +import rotate from "./rotate.js"; +import verifyOptimum from "./verifyOptimum.js"; export default blossom; diff --git a/src/core/blossom/verifyOptimum.js b/src/core/blossom/verifyOptimum.js index 98fc01a..7b2c0f0 100644 --- a/src/core/blossom/verifyOptimum.js +++ b/src/core/blossom/verifyOptimum.js @@ -1,5 +1,5 @@ import assert from 'assert'; -import min from './min'; +import min from "./min.js"; // Verify that the optimum solution has been reached. const verifyOptimum = ({ diff --git a/src/core/blossomNoChecks.js b/src/core/blossomNoChecks.js index bb47e3e..fc3b2be 100644 --- a/src/core/blossomNoChecks.js +++ b/src/core/blossomNoChecks.js @@ -1,4 +1,4 @@ -import blossom from './blossom'; +import blossom from "./blossom/index.js"; const blossomNoChecks = blossom(false, false); diff --git a/src/core/index.js b/src/core/index.js index 1f4e4ae..42e26b3 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -1,5 +1,5 @@ -import blossom from './blossom'; -import blossomNoChecks from './blossomNoChecks'; +import blossom from "./blossom/index.js"; +import blossomNoChecks from "./blossomNoChecks.js"; /* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */ export default { diff --git a/src/index.js b/src/index.js index 4a3e251..db5ab12 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,8 @@ -import cardinality from './cardinality'; -import core from './core'; -import weight from './weight'; -import iter from './iter'; -import addDefaultWeight from './addDefaultWeight'; +import cardinality from "./cardinality/index.js"; +import core from "./core/index.js"; +import weight from "./weight/index.js"; +import iter from "./iter.js"; +import addDefaultWeight from "./addDefaultWeight.js"; export default weight; diff --git a/src/weight/approx/bipartite.js b/src/weight/approx/bipartite.js index c86c194..8b6445d 100644 --- a/src/weight/approx/bipartite.js +++ b/src/weight/approx/bipartite.js @@ -1,3 +1,3 @@ -import general from './general'; +import general from "./general.js"; export default general; diff --git a/src/weight/approx/general.js b/src/weight/approx/general.js index 83115ca..4402dbf 100644 --- a/src/weight/approx/general.js +++ b/src/weight/approx/general.js @@ -1,4 +1,4 @@ -import general from '../opt/general'; +import general from "../opt/general.js"; const generalApprox = (edges, _eps) => general(edges); export default generalApprox; diff --git a/src/weight/approx/index.js b/src/weight/approx/index.js index 70a0b1b..8127fc9 100644 --- a/src/weight/approx/index.js +++ b/src/weight/approx/index.js @@ -1,5 +1,5 @@ -import bipartite from './bipartite'; -import general from './general'; +import bipartite from "./bipartite.js"; +import general from "./general.js"; export default general; diff --git a/src/weight/index.js b/src/weight/index.js index 837ad3f..f5f3f15 100644 --- a/src/weight/index.js +++ b/src/weight/index.js @@ -1,5 +1,5 @@ -import approx from './approx'; -import opt from './opt'; +import approx from "./approx/index.js"; +import opt from "./opt/index.js"; export default opt; diff --git a/src/weight/opt/bipartite.js b/src/weight/opt/bipartite.js index c86c194..8b6445d 100644 --- a/src/weight/opt/bipartite.js +++ b/src/weight/opt/bipartite.js @@ -1,3 +1,3 @@ -import general from './general'; +import general from "./general.js"; export default general; diff --git a/src/weight/opt/general.js b/src/weight/opt/general.js index b97a3f3..cb86103 100644 --- a/src/weight/opt/general.js +++ b/src/weight/opt/general.js @@ -1,4 +1,4 @@ -import blossomNoChecks from '../../core/blossomNoChecks'; +import blossomNoChecks from "../../core/blossomNoChecks.js"; const general = (edges) => blossomNoChecks(edges); diff --git a/src/weight/opt/index.js b/src/weight/opt/index.js index 70a0b1b..8127fc9 100644 --- a/src/weight/opt/index.js +++ b/src/weight/opt/index.js @@ -1,5 +1,5 @@ -import bipartite from './bipartite'; -import general from './general'; +import bipartite from "./bipartite.js"; +import general from "./general.js"; export default general; diff --git a/test/src/cardinality.js b/test/src/cardinality.js index 89fcd15..9739f96 100644 --- a/test/src/cardinality.js +++ b/test/src/cardinality.js @@ -1,9 +1,9 @@ import test from 'ava'; import {enumerate} from '@aureooms/js-itertools'; -import maximumCardinalityMatching from '../../src/cardinality'; -import {addDefaultWeight} from '../../src'; -import blossom from '../../src/core/blossom'; +import maximumCardinalityMatching from "../../src/cardinality/index.js"; +import {addDefaultWeight} from "../../src/index.js"; +import blossom from "../../src/core/blossom/index.js"; const macro = (t, algorithm, edges, expected) => { const input = edges.map((edge) => edge.slice()); // Deepcopy diff --git a/test/src/readme.js b/test/src/readme.js index b25c077..67e62d1 100644 --- a/test/src/readme.js +++ b/test/src/readme.js @@ -1,7 +1,7 @@ import test from 'ava'; -import maximumMatching, {iter} from '../../src'; -import maximumCardinalityMatching from '../../src/cardinality'; +import maximumMatching, {iter} from "../../src/index.js"; +import maximumCardinalityMatching from "../../src/cardinality/index.js"; test('weight', (t) => { const edges = [ diff --git a/test/src/weight.js b/test/src/weight.js index 49bd4ae..3ff023f 100644 --- a/test/src/weight.js +++ b/test/src/weight.js @@ -1,8 +1,8 @@ import test from 'ava'; import {enumerate} from '@aureooms/js-itertools'; -import maximumMatching from '../../src'; -import blossom from '../../src/core/blossom'; +import maximumMatching from "../../src/index.js"; +import blossom from "../../src/core/blossom/index.js"; const macro = (t, algorithm, edges, expected) => { const input = edges.map((edge) => edge.slice()); // Deepcopy