This commit is contained in:
cmerkens 2024-07-05 15:12:42 +02:00
parent e19a031a16
commit 42e9ca5ec8
6 changed files with 59 additions and 30 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/out/ /out/
/.idea/

36
.idea/workspace.xml generated
View File

@ -4,7 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Stable Version 3.0" /> <list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Stable Version 3.0">
<change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -23,16 +25,16 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;Application.Display.executor&quot;: &quot;Run&quot;, "Application.Display.executor": "Run",
&quot;Application.OurApplication.executor&quot;: &quot;Run&quot;, "Application.OurApplication.executor": "Run",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;git-widget-placeholder&quot;: &quot;Versuch__Christian&quot;, "git-widget-placeholder": "main",
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, "kotlin-language-version-configured": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Git/ProjektGraphMain&quot; "last_opened_file_path": "C:/Git/ProjektGraphMain"
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Git\ProjektGraph" /> <recent name="C:\Git\ProjektGraph" />
@ -91,7 +93,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1720120737940</updated> <updated>1720120737940</updated>
</task> </task>
<option name="localTasksCounter" value="6" /> <task id="LOCAL-00006" summary="Stable Version 3.0">
<option name="closed" value="true" />
<created>1720182049903</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1720182049903</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -106,9 +116,9 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Stable Version 3.0" />
<MESSAGE value="Adding AStar Algorithm" /> <MESSAGE value="Adding AStar Algorithm" />
<MESSAGE value="Stable Version with finished visualisation" /> <MESSAGE value="Stable Version with finished visualisation" />
<option name="LAST_COMMIT_MESSAGE" value="Stable Version with finished visualisation" /> <MESSAGE value="Stable Version 3.0" />
<option name="LAST_COMMIT_MESSAGE" value="Stable Version 3.0" />
</component> </component>
</project> </project>

View File

@ -48,7 +48,6 @@ public class OurLogElement extends LogElement{
} }
public OurLogElement(int step, String description, long value, Edge e){ public OurLogElement(int step, String description, long value, Edge e){
this.step = step; this.step = step;
this.description = description; this.description = description;
@ -56,6 +55,7 @@ public class OurLogElement extends LogElement{
this.edge = e; this.edge = e;
} }
public OurLogElement(int step, String description, long value, visualizationElements.Graph ourGraph ){ public OurLogElement(int step, String description, long value, visualizationElements.Graph ourGraph ){
this.step = step; this.step = step;
this.description = description; this.description = description;

View File

@ -285,6 +285,9 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
// Gibt Distanz zu gefragtem Knoten zurück // Gibt Distanz zu gefragtem Knoten zurück
return distance.get(n2); return distance.get(n2);
} }
public int getShortestPathAStar(MarkedVertex<T> n1, MarkedVertex<T> n2) { public int getShortestPathAStar(MarkedVertex<T> n1, MarkedVertex<T> n2) {
// Erstellt Hashmap um Distanz von Startnoten zu jedem Knoten auf dem Graph zu tracken // Erstellt Hashmap um Distanz von Startnoten zu jedem Knoten auf dem Graph zu tracken

View File

@ -4,10 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Adding AStar Algorithm"> <list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Stable Version 3.0">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/Display.java" beforeDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -27,16 +25,16 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;Application.Display.executor&quot;: &quot;Run&quot;, "Application.Display.executor": "Run",
&quot;Application.OurApplication.executor&quot;: &quot;Run&quot;, "Application.OurApplication.executor": "Run",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;git-widget-placeholder&quot;: &quot;main&quot;, "git-widget-placeholder": "main",
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, "kotlin-language-version-configured": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Git/ProjektGraphMain&quot; "last_opened_file_path": "C:/Git/ProjektGraphMain"
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Git\ProjektGraph" /> <recent name="C:\Git\ProjektGraph" />
@ -87,7 +85,23 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1720042374225</updated> <updated>1720042374225</updated>
</task> </task>
<option name="localTasksCounter" value="5" /> <task id="LOCAL-00005" summary="Stable Version with finished visualisation">
<option name="closed" value="true" />
<created>1720120737939</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1720120737940</updated>
</task>
<task id="LOCAL-00006" summary="Stable Version 3.0">
<option name="closed" value="true" />
<created>1720182049903</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1720182049903</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -102,8 +116,9 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Stable Version 3.0" />
<MESSAGE value="Adding AStar Algorithm" /> <MESSAGE value="Adding AStar Algorithm" />
<option name="LAST_COMMIT_MESSAGE" value="Adding AStar Algorithm" /> <MESSAGE value="Stable Version with finished visualisation" />
<MESSAGE value="Stable Version 3.0" />
<option name="LAST_COMMIT_MESSAGE" value="Stable Version 3.0" />
</component> </component>
</project> </project>