getEdgeCount 是 Yuka js库中 Graph 类的一个方法,用于获取图中边的数量。
getEdgeCount
graph.getEdgeCount()
const graph = new Graph(); graph.addEdge(1,2); graph.addEdge(2,3); graph.addEdge(3,4); const edgeCount = graph.getEdgeCount(); // edgeCount = 3