mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
fix: move format into constructor
This commit is contained in:
1 parent
e18f0db5ad
commit
14d6ab961b
2 files changed
-9
No files matched your search
@@ -2,9 +2,6 @@ export default class DAG {
|
||||
constructor(nodes) {
|
||||
this.nodes = new Map(nodes.map((node) => [node._id, node]))
|
||||
this.edges = new Set()
|
||||
}
|
||||
|
||||
format() {
|
||||
this.nodes.forEach((_, id) => {
|
||||
this.setLayer(id)
|
||||
this.addEdges(id)
|
||||
|
||||
Reference in new issue
Block a user