mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-18 18:56:10 +00:00
Initial commit
This commit is contained in:
15
node_modules/graphlib/lib/alg/is-acyclic.js
generated
vendored
Normal file
15
node_modules/graphlib/lib/alg/is-acyclic.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
var topsort = require("./topsort");
|
||||
|
||||
module.exports = isAcyclic;
|
||||
|
||||
function isAcyclic(g) {
|
||||
try {
|
||||
topsort(g);
|
||||
} catch (e) {
|
||||
if (e instanceof topsort.CycleException) {
|
||||
return false;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user