()
| 5 | } |
| 6 | |
| 7 | func NewDirected() *DirGraph { |
| 8 | return &DirGraph{ |
| 9 | graph{ |
| 10 | edgesCount: 0, |
| 11 | edges: make(map[VertexId]map[VertexId]int), |
| 12 | isDirected: true, |
| 13 | }, |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | func (g *graph) GetPredecessors(vertex VertexId) VerticesIterable { |
| 18 | iterator := func() <-chan VertexId { |
no outgoing calls