Пример #1
0
 public Graph(int vertexCount, GraphOrientationType orientation = GraphOrientationType.NotOriented)
 {
     _adjacencyMatrix = new double[vertexCount][];
     for (int i = 0; i < vertexCount; i++)
     {
         _adjacencyMatrix[i] = new double[vertexCount];
     }
     _graphOrientationType = orientation;
 }
Пример #2
0
 public Graph(double[][] adjacencyMatrix, GraphOrientationType orientation = GraphOrientationType.NotOriented) : this(adjacencyMatrix.Length, orientation)
 {
     for (int i = 0; i < VertexCount; i++)
     {
         for (int j = 0; j < VertexCount; j++)
         {
             _adjacencyMatrix[i][j] = adjacencyMatrix[i][j];
         }
     }
 }