func (adjGrp Graph) CalculateAvgDegree() float64 {
	if adjGrp.averageDegree != float64(0) {
		return adjGrp.averageDegree
	}
	var avg float64
	var count float64
	for _, value := range adjGrp.Graph {

		for _, char := range value {
			if len(char) != 0 || char != " " {
				avg += float64(len(char))
				count++
			}
		}

	}

	adjGrp.averageDegree = avg / count

	return adjGrp.averageDegree
}
func (adjGrp Graph) CalculateAvgDegree() float64 {
	if adjGrp.averageDegree != float64(0) {
		return adjGrp.averageDegree
	}
	var avg float64
	var count float64
	for _, value := range adjGrp.Graph {

		for _, char := range value {
			if len(char) != 0 || char != " " {
				avg += float64(len(char))
				count++
			}
		}

	}

	adjGrp.averageDegree = avg / count

	return adjGrp.averageDegree
}
func ( adjGrp Graph ) CalculateAvgDegree ( ) float64 { if adjGrp . averageDegree != float64 ( 0 ) { return adjGrp . averageDegree } var avg float64 var count float64 for _ , value := range adjGrp . Graph { for _ , char := range value { if len ( char ) != 0 || char != " " { avg += float64 ( len ( char ) ) count ++ } } } adjGrp . averageDegree = avg / count return adjGrp . averageDegree }
// CalculateAvgDegree calclates the average degree between nodes in the graph
//on qwerty, 'g' has degree 6, being adjacent to 'ftyhbv'. '\' has degree 1.
//this calculates the average over all keys.
//TODO double check that i ported this correctly scoring.coffee ln 5
CalculateAvgDegree calclates the average degree between nodes in the graph on qwerty g has degree 6 being adjacent to ftyhbv . \ has degree 1 . this calculates the average over all keys . TODO double check that i ported this correctly scoring . coffee ln 5