View Code? Open in Web Editor
NEW
A lib containing multible usages for graph structure, graph algorithm, and other graph ops.
License: MIT License
TypeScript 98.63%
JavaScript 1.17%
Shell 0.20%
graphlib's Introduction
- Manage graph structure data with simple APIs.
- Easily batch multiple changes for performance optimization.
- GraphView for efficient data transformation.
- feat: supports undefined parent as unsetting parent for setParent API;
MIT@AntV.
graphlib's People
graphlib's Issues
[中级任务]
参考 batch 的方式,batch 是批量处理多个数据 API,只抛出一次 changes;silence 是处理数据后不抛出任何的 changes,两者都是对性能进行优化。
batch
Batch several graph changes into one. Make several changes, but dispatch only one ChangedEvent at the end of batch:
graph.batch(() => {
graph.addNodes([]);
graph.addEdges([]);
});
silence
DO NOT dispatch any changes.
graph.silence(() => {
graph.addNodes([]);
graph.addEdges([]);
});