Beispiel #1
0
		public void calcCentr() 
		{
			int[] centr = new int[Nodes [0].attributes.Length];
			for (int i=0; i < centr.Length; i++) {
				for (int j=0; j < Nodes.Count; j++) {
					centr[i] += Nodes [j].attributes [i]/Nodes.Count;
				}
			}
			Centr = new Node(centr);
		}
Beispiel #2
0
		public void addNode(Node node)
		{
			Nodes.Add (node);
		}
Beispiel #3
0
		public Cluster(Node centr)
		{
			Centr = centr;
		}