public MatriceAdjacence(int nbrelt, TypeDeGraph typeDeGraph) { if (nbrelt > 1) { Matrice = new bool[nbrelt, nbrelt]; TypeDeGraph = typeDeGraph; } else { throw new IndexOutOfRangeException(); } }
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(); } }