public void Print(Claster item) { }
public void HideNodes(Claster claster) { claster.Show(SetVisibilityNode(claster.Nodes, Visibility.Hidden)); claster.RePrint(); }
public void ShowNodes(Claster claster) { SetVisibilityNode(claster.Nodes, Visibility.Visible); claster.Hide = Visibility.Hidden; claster.RePrint(); }
private void BuldPleyads() { for (int i = 1; i < matrix.Length; i++) { for (int j = 0; j < matrix[i].Length; j++) { if (i == j) { continue; } if (Math.Abs(matrix[i][j]) < 0.001f) { continue; } if (Math.Abs(matrix[i][j]) < EpsEdge) { continue; } edges.Add(new Edge(matrix[i][j]) { A = nodes[i], B = nodes[j] }); nodes[i].Links.Add(j); nodes[j].Links.Add(i); } } List <int> nodesIds; // creating Clasters for (int i = nodes.Count - 1; i >= 0; i--) { if (nodes[i].Sorted) { continue; } nodesIds = Clastering(nodes[i]); if (nodesIds.Count < 2) { continue; } Claster clr = new Claster() { Nodes = nodesIds.ToArray(), Pos = new Vector(CentrX / 5 + CentrX / 5 * (clasters.Count() % 5), CentrY / 5 + CentrY / 5 * (int)(clasters.Count() / 5 + clasters.Count() % 2)), ID = clasters.Count() }; clr.Init(nodes); clasters.Add(clr); } nodesIds = new List <int>(); for (int i = 0; i < nodes.Count; i++) { if (nodes[i].HaveClaster) { continue; } nodesIds.Add(i); } clasters.Add(new Claster() { Nodes = nodesIds.ToArray(), Pos = new Vector(CentrX / 5 + CentrX / 5 * (clasters.Count() % 5), CentrY / 5 + CentrY / 5 * (int)(clasters.Count() / 5 + clasters.Count() % 2)), ID = clasters.Count() }); clasters.Last().Init(nodes); }