Exemple #1
0
        public List <Class_alfabeto> tablaEpsido()
        {
            List <Class_alfabeto> lista = new List <Class_alfabeto>();

            Class_nodos aux      = this.inicio;
            Class_nodos auxnext2 = new Class_nodos();

            while (aux != null)
            {
                Class_alfabeto n = new Class_alfabeto();   n.setAlfabeto(this.alfabeto);
                n.setnumeroNodo(aux.getContadorNodo().ToString());
                for (int j = 0; j < aux.getListTransiciones().Count(); j++)
                {
                    n.setnumeroNodo(aux.getContadorNodo().ToString());  // agrego el numero del nodo en el cual recorro
                    n.addIntervalo(aux.getListTransiciones()[j]);       //añado la transicion en la cual estoy recorriendo
                    n.setEstado_aceptacion(aux.getEstado_aceptacion()); //////////////////////////////////////////// se añadio para pasar estado de aceptacion
                }
                lista.Add(n);



                if (aux.getNext2() != null)
                {
                    auxnext2 = aux.getNext2();
                    Class_alfabeto n2 = new Class_alfabeto(); n2.setAlfabeto(this.alfabeto);
                    n2.setnumeroNodo(auxnext2.getContadorNodo().ToString());


                    while (auxnext2 != null)
                    {
                        for (int j = 0; j < auxnext2.getListTransiciones().Count(); j++)
                        {
                            n2.setnumeroNodo(auxnext2.getContadorNodo().ToString()); // agrego el numero del nodo en el cual recorro
                            n2.addIntervalo(auxnext2.getListTransiciones()[j]);      //añado la transicion en la cual estoy recorriendo
                        }

                        lista.Add(n2);
                        n2       = new Class_alfabeto();
                        auxnext2 = auxnext2.getNext1();
                    }
                }
                n   = new Class_alfabeto();
                aux = aux.getNext1();
            }

            return(lista);
        }