def completeLink(list1, list2, dimens=4):
	distLarge = 0

	for x in range(0, len(list1)):
		for y in range(0, len(list2)):
			distNow = calcEuclideanDist(list1[x], list2[y], 4)
			if distNow > distLarge:
				distLarge = distNow

	return distLarge
def averageLink(list1, list2, dimens=4):
	distSum = 0
	N = 0

	for x in range(0, len(list1)):
		for y in range(0, len(list2)):
			distNow = calcEuclideanDist(list1[x], list2[y], 4)
			distSum = distSum + distNow
			N = N + 1
			
	averageLink = distSum/N
	return averageLink
def getDiameter(dataFrame):
	size = len(dataFrame)
	print size

	myList = dataFrame.values.tolist()
	#print myList
	diam = 0
	N = size
	for i in range(0,N):
		for j in range(0,N):
			if i is not j:
				diam = diam + (calcEuclideanDist(myList[i],myList[j])**2)

	return math.sqrt(diam/(N*(N-1)))