Open deklanw opened 3 years ago
I believe the issue here is that vertices that have no edges connected to them disappear from the ordering. They do show in the components, but they are omitted in the construction of the layers, because they have no neighbors:
const layer1 = comp.filter((n) => graph.outDegree(n) !== 0);
const layer2 = comp.filter((n) => graph.inDegree(n) !== 0);
I thought that the three values in the returned array are the permutations of the columns, the rows, and the number of crossings. But, I noticed in my results that the lengths of the permutations seem off.
Adding these two assertions to the tests in
barycenter-test.js
causes a failure for the
hard
test, but not thesimple
test.Am I missing something here? Thanks