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); }
public void addNode(Node node) { Nodes.Add (node); }
public Cluster(Node centr) { Centr = centr; }