func (g Graph) Validate() error {
	for vertex, vertices := range g {
		for _, child := range vertices {
			if !g.ValidState(child) {
				return errors.NotValidf("vertex %q edge to vertex %q is", vertex, child)
			}
		}
	}
	return nil
}
// Validate attempts to ensure that all edges from a vertex have a vertex to
// the root graph.
Validate attempts to ensure that all edges from a vertex have a vertex to
the root graph.
// Validate attempts to ensure that all edges from a vertex have a vertex to // the root graph .
func (g Graph) Validate() error {
	for vertex, vertices := range g {
		for _, child := range vertices {
			if !g.ValidState(child) {
				return errors.NotValidf("vertex %q edge to vertex %q is", vertex, child)
			}
		}
	}
	return nil
}
func ( g Graph ) Validate ( ) error { for vertex , vertices := range g { for _ , child := range vertices { if ! g . ValidState ( child ) { return errors . NotValidf ( " " , vertex , child ) } } } return nil }
Validate attempts to ensure that all edges from a vertex have a vertex to
the root graph.
Validate attempts to ensure that all edges from a vertex have a vertex to the root graph .