Sync with upstream

This commit is contained in:
Frank Schiebel 2024-03-12 17:34:56 +01:00
parent 39a2f13410
commit 66e8fa72bf
135 changed files with 38902 additions and 37757 deletions

View file

@ -456,6 +456,7 @@ public class Graph
if (!isKnotenEnthalten(k)){
kList.add(k);
adList.add(new ArrayList<Kante>());
k.setGraph(this);
}
}
@ -493,6 +494,7 @@ public class Graph
}
adList.remove(index);
kList.remove(k);
k.setGraph(null);
return true;
}
@ -577,6 +579,7 @@ public class Graph
adList.get(kList.indexOf(e.getStart())).add(e);
if(!gerichtet) adList.get(kList.indexOf(e.getZiel())).add(e);
kaList.add(e);
e.setGraph(this);
}
/**
@ -625,8 +628,10 @@ public class Graph
}
}
kaList.remove(e1);
e1.setGraph(null);
if(!gerichtet) {
kaList.remove(e2);
e2.setGraph(null);
}
}
@ -654,6 +659,8 @@ public class Graph
* Loescht den gesamten Graphen
*/
public void loescheAlles() {
for(Kante k : kaList) k.setGraph(null);
for(Knoten k : kList) k.setGraph(null);
adList.clear();
kList.clear();
kaList.clear();