概述
目录
Vis (接口)
一种简单的图结构
签名
interface Vis {
edges: Array<{
from: string
to: string
}>
nodes: Array<{
id: string
label: String
}>
}
v0.2.0 中添加
IgnoreNames (常量)
签名
export const IgnoreNames: string[] = ...
v0.2.0 中添加
createVis (函数)
用 Graph 建立 Vis
签名
export const createVis = (a: Graph): Vis => ({
nodes: pipe(
a.getAllVertices(),
A.map(a => ({ id: a.getKey(), label: a.toString() }))
),
edges: pipe(
a.getAllEdges(),
A.map(a => ...
v0.2.0 中添加