Package fmg.fmg8.graphVis.graph

Examples of fmg.fmg8.graphVis.graph.Knoten


     *
     * @return Ob eine Kante von A nach Z existiert.
     */
    public boolean kanteExistiert(final Integer knoten1,
                                  final Integer knoten2) {
        Knoten k1;

        if (knoten1 == null || knoten2 == null) {
            return false;
        }
       
        k1 = this.holeKnoten(knoten1);

        if (k1 == null) {
            return false;
        }
       
        return k1.holeNachfolger().containsKey(knoten2);
    }
View Full Code Here


     * @param l  Ein Zielknotenname.
     *
     * @return  Ob l von k aus erreichbar ist.
     */
    public boolean erreichbar(final Integer k, final Integer l) {
        Knoten start;
        Knoten ziel;
       
        if (k == null) {
            start = this.holeStartzustand();
        } else {
            start = this.holeKnoten(k);
View Full Code Here

        besucht.add(k);
        nachF = new ArrayList<Knoten>(k.holeNachfolger().values());

        it = nachF.iterator();
        while (it.hasNext()) {
            Knoten aktNachf = (Knoten) it.next();
           
            LinkedList<Transition> transs
                = ((ZInfo) k.getInfo()).getTransZuZustand(
                        ((Integer) aktNachf.holeName()).intValue());
            Iterator<Transition> it2 = transs.iterator();
           
            while (it2.hasNext()) {
                Transition trans = (Transition) it2.next();
               
View Full Code Here

     * @return  Die Instruktion des aktuellen Zustands oder "", wenn im
     *          aktuellen Zustand keine Scriptinstruktion decodiert wurde.
     */
    private String naechsterZustand() {
        String inst = "";
        Knoten aktZust = this.holeKnoten(this.aktZustand);
        ZInfo info;
        LinkedList<Transition> bedingungen;
        int aktion;
        int par, parStand;
        int zusatz, zusatzStand;
        int regNumZiel;
        int regNumQuelle;
        int scrAktion;
        int k;
        int zwisch;
       
        if (this.boc || this.eoc) {
            return null;
        }
       
        if (aktZust == null) {
            aktZust = this.holeStartzustand();
           
            if (aktZust == null) {
                return null;
            }
           
            this.aktZustand = aktZust.holeName();
        }
       
        info = aktZust.getInfo();
        aktion = info.getAktion();
       
        // Aktion ermitteln und zusammenstellen.
        if (aktion == Konstanten.AUT_ADD_EDGE
                || aktion == Konstanten.AUT_ADD_NODE
View Full Code Here

                                    final Integer kName2) {
        if (kName1 == null || kName2 == null) {
            return null;
        }

        Knoten k1 = this.holeKnoten(kName1);
        if (k1 == null) {
            return null;
        }
       
        ZInfo z = (ZInfo) k1.getInfo();
        List<Transition> l = z.getTransZuZustand(((Integer) kName2).intValue());
       
        if (l.size() > 0) {
            return ((Transition) l.get(0)).getCond();
        } else {
View Full Code Here

       
        final EndlicherAutomat anderer = (EndlicherAutomat) obj;
       
        HashSet<Integer> s1 = new HashSet<Integer>();
        HashSet<Integer> s2 = new HashSet<Integer>();
        Knoten k2;
       
        s1.addAll(this.getAdjazenzliste().keySet());
        s2.addAll(anderer.getAdjazenzliste().keySet());
       
        // �berpr�fe vorhandene Knotennamen in Automaten.
        if (!s1.equals(s2)) {
            return false;
        }
       
        // �berpr�fe f�r jeden Knoten: Info und Nachfolger der Knoten.
        for (Knoten k : this.getAdjazenzliste().values()) {
            k2 = anderer.holeKnoten(k.holeName());
            s1.clear();
            s2.clear();
            s1.addAll(k.holeNachfolger().keySet());
            s2.addAll(k2.holeNachfolger().keySet());
           
            if (!s1.equals(s2)
                    || !k.getInfo().equals(k2.getInfo())) {
                return false;
            }
        }
       
        return true;
View Full Code Here

                int num = Integer.parseInt(
                        this.pars.getAutomatInGIFModus().split(":")[1]);
                bester = this.akteure.get(num);
            }
            PfeilMaster master = new PfeilMaster(this.pars);
            Knoten aktKnot = bester.getAktZustand();
            if (aktKnot == null) {
                aktKnot = bester.getVAut()[0].holeStartzustand();
            }
            DargestellterGraph darstellung = new DarstModEA(
                    0,
View Full Code Here

     * @return  Die Instruktion des aktuellen Zustands oder "", wenn im
     *          aktuellen Zustand keine Scriptinstruktion decodiert wurde.
     */
    private String naechsterZustand() {
        String inst = "";
        Knoten aktZust = this.holeKnoten(this.aktZustand);
        ZInfo info;
        LinkedList<Transition> bedingungen;
        int aktion;
        int par, parStand;
        int zusatz, zusatzStand;
        int regNumZiel;
        int regNumQuelle;
        int scrAktion;
        int k;
       
        if (this.boc || this.eoc) {
            return null;
        }
       
        if (aktZust == null) {
            aktZust = this.holeStartzustand();
           
            if (aktZust == null) {
                return null;
            }
           
            this.aktZustand = aktZust.holeName();
        }
       
        info = aktZust.getInfo();
       
        aktion = info.getAktion();
       
        // Aktion ermitteln und zusammenstellen.
        if (aktion == Konstanten.AUT_ADD_EDGE
View Full Code Here

     */
    public boolean entferneKnoten(final Integer knotenName) {
        final ArrayList<Integer> knotenlisteV;
        final ArrayList<Integer> knotenlisteN;
        Iterator<Integer>  it;
        Knoten          knoten;
        HashMap<Integer, Knoten> nachfolger;
        HashMap<Integer, Knoten> vorgaenger;

        nachfolger = this.holeKnoten(knotenName).holeNachfolger();
        vorgaenger = this.holeKnoten(knotenName).holeVorgaenger();
        knotenlisteN = new ArrayList<Integer>(nachfolger.keySet());
        knotenlisteV = new ArrayList<Integer>(vorgaenger.keySet());

        if (this.startKnName != null
            && this.startKnName.equals(knotenName)) {
            this.entferneStartZ();
        }

        if (this.holAdj().containsKey(knotenName)) {
            it = knotenlisteV.iterator();
            while (it.hasNext()) {
                knoten = this.holeKnoten(it.next());
                this.entferneKante(knoten.holeName(), knotenName);
                knoten.entferneNachfolger(this.holeKnoten(knotenName));
                knoten.entferneVorgaenger(this.holeKnoten(knotenName));
            }
            it = knotenlisteN.iterator();
            while (it.hasNext()) {
                knoten = this.holeKnoten(it.next());
                knoten.entferneNachfolger(this.holeKnoten(knotenName));
                knoten.entferneVorgaenger(this.holeKnoten(knotenName));
            }
            this.holAdj().remove(knotenName);
           
            this.sequenz = null;
           
View Full Code Here

    public boolean einfuegKante(final Integer    knotenName1,
                                final Integer    knotenName2,
                                final Condition  cond,
                                final int        alt) {

        final Knoten knoten1 = this.holeKnoten(knotenName1);
        final Knoten knoten2 = this.holeKnoten(knotenName2);
        ZInfo zusatz1;
        final Transition bed;

        if (!this.getAdjazenzliste().containsKey(knotenName1)
            || !this.getAdjazenzliste().containsKey(knotenName2)) {
            throw new RuntimeException(
                Messages.getString("EndlicherAutomat."
                    + "EinerderbeidenKnotenexistiertnicht"));
        }

        knoten1.neuerNachfolger(knoten2);
        knoten2.neuerVorgaenger(knoten1);

        zusatz1 = knoten1.getInfo();
        bed = new Transition(cond,
                             knotenName1.intValue(),
                             knotenName2.intValue(),
View Full Code Here

TOP

Related Classes of fmg.fmg8.graphVis.graph.Knoten

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.