* Iterate all edges
(
cb: (this: Ctx, edge: GraphEdge, idx: number) => void,
context?: Ctx
)
| 196 | * Iterate all edges |
| 197 | */ |
| 198 | eachEdge<Ctx>( |
| 199 | cb: (this: Ctx, edge: GraphEdge, idx: number) => void, |
| 200 | context?: Ctx |
| 201 | ) { |
| 202 | const edges = this.edges; |
| 203 | const len = edges.length; |
| 204 | for (let i = 0; i < len; i++) { |
| 205 | if (edges[i].dataIndex >= 0 |
| 206 | && edges[i].node1.dataIndex >= 0 |
| 207 | && edges[i].node2.dataIndex >= 0 |
| 208 | ) { |
| 209 | cb.call(context, edges[i], i); |
| 210 | } |
| 211 | } |
| 212 | }; |
| 213 | |
| 214 | /** |
| 215 | * Breadth first traverse |
no outgoing calls
no test coverage detected