Compare commits

2 Commits

Author SHA1 Message Date
kl
9febce868c AusführenIrrgarten 2023-04-25 11:16:50 +02:00
kl
f7558d2d37 df 2023-04-25 10:46:59 +02:00
4 changed files with 51 additions and 2 deletions

View File

@@ -68,4 +68,48 @@ class ARBEIT
System. out. println ("Breitensuche");
g. BreitenSuche ("M");
}
void AusführenIrrgarten() {
GRAPH_MATRIX g;
g = new GRAPH_MATRIX (14);
g. KnotenEinfuegen ("St");
g. KnotenEinfuegen ("A");
g. KnotenEinfuegen ("B");
g. KnotenEinfuegen ("C");
g. KnotenEinfuegen ("D");
g. KnotenEinfuegen ("E");
g. KnotenEinfuegen ("F");
g. KnotenEinfuegen ("G");
g. KnotenEinfuegen ("H");
g. KnotenEinfuegen ("I");
g. KnotenEinfuegen ("J");
g. KnotenEinfuegen ("K");
g. KnotenEinfuegen ("L");
g. KnotenEinfuegen ("M");
g. KnotenEinfuegen ("N");
g. KnotenEinfuegen ("O");
g. KnotenEinfuegen ("P");
g. KanteEinfuegen ("St", "A", 1);
g. KanteEinfuegen ("A", "B", 1);
g. KanteEinfuegen ("A", "D", 192);
g. KanteEinfuegen ("B", "C", 116);
g. KanteEinfuegen ("B", "I", 166);
g. KanteEinfuegen ("D", "G", 98);
g. KanteEinfuegen ("D", "E", 64);
g. KanteEinfuegen ("E", "F", 163);
g. KanteEinfuegen ("E", "J", 117);
g. KanteEinfuegen ("I", "H", 60);
g. KanteEinfuegen ("I", "P", 59);
g. KanteEinfuegen ("P", "O", 165);
g. KanteEinfuegen ("P", "N", 126);
g. KanteEinfuegen ("N", "L", 103);
g. KanteEinfuegen ("N", "M", 53);
g. KanteEinfuegen ("M", "K", 127);
g. KanteEinfuegen ("M", "J", 72);
g. KanteEinfuegen ("J", "Zi", 72);
g.BreitenSuche("St");
}
}

View File

@@ -2,7 +2,7 @@ import Liste. *;
/**
* Verwaltet einen Graphen mit Hilfe einer Adjazenzmatrix.
*
* @author Albert Wiedemann
* @author Albert
* @version 1.0
*/
class GRAPH_MATRIX
@@ -178,6 +178,7 @@ class GRAPH_MATRIX
if ((matrix [aktKnoten] [k] > 0) && (! besucht [k]) && (! offeneKnoten. Enthaelt (info)))
{
offeneKnoten. HintenEinfuegen (info);
}
}
info = (KNOTENINFO) offeneKnoten. AnfangEntfernen ();
@@ -192,4 +193,6 @@ class GRAPH_MATRIX
} while (aktKnoten >= 0);
}
}
}

View File

@@ -16,4 +16,6 @@ public interface DATENELEMENT
* return true, wernn dei Schlüsselwerte gleich sind
*/
boolean SchluesselIstGleich (DATENELEMENT d);
String BezeichnungGeben();
}

View File

@@ -1,5 +1,5 @@
------------------------------------------------------------------------
Hallo zusammen! This is the project README file. Here, you should describe your project.
Testedit:This is the project README file. Here, you should describe your project.
Tell the reader (someone who does not know anything about this project)
all he/she needs to know. The comments should usually include at least:
------------------------------------------------------------------------