Esempio n. 1
0
 public MatriceAdjacence(int nbrelt, TypeDeGraph typeDeGraph)
 {
     if (nbrelt > 1)
     {
         Matrice     = new bool[nbrelt, nbrelt];
         TypeDeGraph = typeDeGraph;
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }
Esempio n. 2
0
 public MatriceIncidence(int nbrelt, int nbarc, TypeDeGraph typegraph)
 {
     if (nbrelt > 2 && nbarc > 2)
     {
         this.nbrarcs     = nbarc;
         this.nbrelts     = nbrelt;
         this.TypeDeGraph = typegraph;
         Matrice          = new int[nbarc, nbrelt];
     }
     else
     {
         throw new IndexOutOfRangeException();
     }
 }