Example #1
0
        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();
        }
Example #2
0
 public Metric()
 {
     intPath = new VertexSet();
 }