pgraph: Update graph API to remove Get prefix and add Adjacency

Simple cleanups.
This commit is contained in:
James Shubin
2017-05-15 09:56:28 -04:00
parent e67d97d9da
commit cc8e2e40dd
4 changed files with 21 additions and 15 deletions

View File

@@ -58,8 +58,8 @@ func (ag *baseGrouper) init(g *Graph) error {
if ag.graph != nil {
return fmt.Errorf("the init method has already been called")
}
ag.graph = g // pointer
ag.vertices = ag.graph.GetVerticesSorted() // cache in deterministic order!
ag.graph = g // pointer
ag.vertices = ag.graph.VerticesSorted() // cache in deterministic order!
ag.i = 0
ag.j = 0
if len(ag.vertices) == 0 { // empty graph