archunit
Version:
ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app
19 lines • 722 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.calculateCycles = void 0;
const trajan_scc_1 = require("./trajan-scc");
const johnsons_apsp_1 = require("./johnsons-apsp");
function calculateCycles(idEdges) {
const cycles = [];
const tarjan = new trajan_scc_1.TrajanSCC();
const stronglyConnectedComponents = tarjan.findStronglyConnectedComponents(idEdges);
stronglyConnectedComponents.forEach((scc) => {
const johnson = new johnsons_apsp_1.JohnsonsAPSP();
if (scc.length > 1) {
cycles.push(...johnson.findSimpleCycles(scc));
}
});
return cycles;
}
exports.calculateCycles = calculateCycles;
//# sourceMappingURL=cycles.js.map