Exemple #1
0
		public static bool EsEuleriano(Grafo Grafo)
		{
			foreach (Vertice Vertice in Grafo.Vertices) {
				if (!Vertice.GradoPar) {
					return false;
				}
			}

			return true;
		}
Exemple #2
0
		public static Grafo SubGrafo(Grafo Grafo, params Vertice[] Vertices)
		{
			List<Arista> Aristas = new List<Arista>();

			foreach (Arista Arista in Grafo.Aristas) {
				if (!Aristas.Contains(Arista)) {
					foreach (Vertice Vertice in Grafo.Vertices) {
						if (Vertice.AristaValida[Arista]) {
							Aristas.Add(Arista);
							break; // TODO: might not be correct. Was : Exit For
						}
					}
				}
			}

			return new Grafo(Vertices, Aristas.ToArray());
		}
Exemple #3
0
		public static Grafo SubGrafo(Grafo Grafo, Recorrido Recorrido)
		{
			return SubGrafo(Grafo, Recorrido.Vertices);
		}
Exemple #4
0
		public static Recorrido RecorridoEuleriano(Grafo Grafo)
		{
			List<Vertice> Retorno = null;


		}
Exemple #5
0
		public static Grafo SubGrafo(Grafo G1, Grafo G2)
		{
			return SubGrafo(G1, G2.Vertices);
		}
Exemple #6
0
		public Recorrido(ref Grafo Grafo, params Vertice[] Recorrido)
		{
			mGrafo = Grafo;
			mVertices = Recorrido;
		}