1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.isAcyclic = void 0;
|
4 | const topsort_1 = require("./topsort");
|
5 | function isAcyclic(g) {
|
6 | try {
|
7 | (0, topsort_1.topsort)(g);
|
8 | }
|
9 | catch (e) {
|
10 | if (e instanceof topsort_1.CycleException) {
|
11 | return false;
|
12 | }
|
13 | throw e;
|
14 | }
|
15 | return true;
|
16 | }
|
17 | exports.isAcyclic = isAcyclic;
|
18 | //# sourceMappingURL=is-acyclic.js.map |
\ | No newline at end of file |