func (g *Graph) SelfLoopsNum() int {
	loop := 0

	for _, v := range g.Vertices {
		for _, w := range v.Adjacencies {
			if w.Key == v.Key {
				loop++
			}
		}
	}

	return loop / 2
}
// SelfLoopsNum returns the number of Self loops
SelfLoopsNum returns the number of Self loops
// SelfLoopsNum returns the number of Self loops
func (g *Graph) SelfLoopsNum() int {
	loop := 0
	for _, v := range g.Vertices {
		for _, w := range v.Adjacencies {
			if w.Key == v.Key {
				loop++
			}
		}
	}
	return loop / 2
}
func ( g * Graph ) SelfLoopsNum ( ) int { loop := 0 for _ , v := range g . Vertices { for _ , w := range v . Adjacencies { if w . Key == v . Key { loop ++ } } } return loop / 2 }
SelfLoopsNum returns the number of Self loops
SelfLoopsNum returns the number of Self loops