UNPKG

archunit

Version:

ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app

18 lines 688 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateCycles = calculateCycles; 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; } //# sourceMappingURL=cycles.js.map