public void SetMatrix(int[,] adjacencyMatrix) { int size = Convert.ToInt32(Math.Sqrt(System.Convert.ToDouble(adjacencyMatrix.Length))); width = size; height = size; matrix = new int[size, size]; weight = new int[size]; vertexSet = new VertexSet(size); v_path = new VertexSet[size]; for (int i = 0; i < v_path.Length; i++) { v_path[i] = new VertexSet(size); } matrix = (int[, ])adjacencyMatrix.Clone(); }
public Metric() { intPath = new VertexSet(); }