Funktionierende Version
This commit is contained in:
parent
dd18dbd55e
commit
3c709ec120
28
.idea/workspace.xml
generated
28
.idea/workspace.xml
generated
@ -5,25 +5,14 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Weighting gefixt">
|
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Weighting gefixt">
|
||||||
<change afterPath="$PROJECT_DIR$/graph/VertexWeightMarking.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/OurApplication/OurApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurApplication.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/graph/Graph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/Graph.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/graph/UndirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/UndirectedGraph.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/graph/VertexMarking.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/VertexMarking.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurAlgorithm.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurAlgorithm.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurAlgorithm.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurAlgorithm.class" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurDrawArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurDrawArea.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurDrawArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurDrawArea.class" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/DirectedGraph.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/DirectedGraph.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurParameterArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurParameterArea.class" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/ExampleGraphs.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/ExampleGraphs.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/Graph.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/Graph.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/UndirectedGraph.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/UndirectedGraph.class" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/VertexWeightMarking.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/VertexWeightMarking.class" afterDir="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" />
|
||||||
@ -200,17 +189,22 @@
|
|||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
<breakpoints>
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
|
||||||
<url>file://$PROJECT_DIR$/OurApplication/OurDrawArea.java</url>
|
|
||||||
<line>51</line>
|
|
||||||
<option name="timeStamp" value="5" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
<url>file://$PROJECT_DIR$/OurApplication/OurAlgorithm.java</url>
|
<url>file://$PROJECT_DIR$/OurApplication/OurAlgorithm.java</url>
|
||||||
<line>46</line>
|
<line>46</line>
|
||||||
<option name="timeStamp" value="6" />
|
<option name="timeStamp" value="6" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/OurApplication/OurParameterArea.java</url>
|
||||||
|
<line>142</line>
|
||||||
|
<option name="timeStamp" value="7" />
|
||||||
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
|
<watches-manager>
|
||||||
|
<configuration name="Application">
|
||||||
|
<watch expression="newGraph.screenGraph" />
|
||||||
|
</configuration>
|
||||||
|
</watches-manager>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -73,7 +73,7 @@ public class OurAlgorithm extends Algorithm {
|
|||||||
|
|
||||||
|
|
||||||
if(this.methodButtons.getSelectedMethod()){
|
if(this.methodButtons.getSelectedMethod()){
|
||||||
// this.currentGraph.getShortestPathDijkstra(start, end);
|
this.currentGraph.getShortestPathDijkstra(start, end);
|
||||||
}else{
|
}else{
|
||||||
this.currentGraph.getShortestPathAStar(start, end);
|
this.currentGraph.getShortestPathAStar(start, end);
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ public class OurDrawArea extends DrawArea{
|
|||||||
public OurDrawArea(LogElementList<OurLogElement> logList, String drawAreaName){
|
public OurDrawArea(LogElementList<OurLogElement> logList, String drawAreaName){
|
||||||
super(logList, drawAreaName);
|
super(logList, drawAreaName);
|
||||||
|
|
||||||
|
/*
|
||||||
this.addMouseListener(new MouseListener() {
|
this.addMouseListener(new MouseListener() {
|
||||||
|
|
||||||
MarkedVertex<VertexMarking> temp = null;
|
MarkedVertex<VertexMarking> temp = null;
|
||||||
@ -87,9 +88,11 @@ public class OurDrawArea extends DrawArea{
|
|||||||
public void mouseExited(MouseEvent e) {
|
public void mouseExited(MouseEvent e) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public void setCurrentGraph(graph.Graph<VertexMarking, EdgeMarking> graph) {
|
public void setCurrentGraph(graph.Graph<VertexMarking, EdgeMarking> graph) {
|
||||||
this.currentGraph = graph;
|
this.currentGraph = graph;
|
||||||
}
|
}
|
||||||
@ -136,7 +139,7 @@ public class OurDrawArea extends DrawArea{
|
|||||||
double distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
double distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
||||||
return distance <= radius;
|
return distance <= radius;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a visualization element.
|
* Draws a visualization element.
|
||||||
|
@ -7,6 +7,7 @@ import javax.swing.*;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides an example for using visualization.ParameterArea.
|
* This class provides an example for using visualization.ParameterArea.
|
||||||
@ -124,8 +125,8 @@ public class OurParameterArea extends ParameterArea{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Vertex Eingabe: A-23-23;A-23-23
|
// Vertex Eingabe: A-100-100;B-200-200;C-100-200;D-200-100
|
||||||
// Edge Eingabe: A-B-15;A-B-15
|
// Edge Eingabe: A-B-15;C-D-10;D-A-3
|
||||||
public DirectedGraph<VertexMarking, EdgeMarking> createGraph(String vertices, String edges) {
|
public DirectedGraph<VertexMarking, EdgeMarking> createGraph(String vertices, String edges) {
|
||||||
DirectedGraph<VertexMarking, EdgeMarking> newGraph = new DirectedGraph<>();
|
DirectedGraph<VertexMarking, EdgeMarking> newGraph = new DirectedGraph<>();
|
||||||
|
|
||||||
@ -143,9 +144,9 @@ public class OurParameterArea extends ParameterArea{
|
|||||||
for (String i: allEdges) {
|
for (String i: allEdges) {
|
||||||
String[] current = i.split("-");
|
String[] current = i.split("-");
|
||||||
for (MarkedVertex<VertexMarking> j: newGraph.getAllVertexes()) {
|
for (MarkedVertex<VertexMarking> j: newGraph.getAllVertexes()) {
|
||||||
if (j.getName() == current[0]) {
|
if (Objects.equals(j.getName(), current[0])) {
|
||||||
start = j;
|
start = j;
|
||||||
} else if (j.getName() == current[1]) {
|
} else if (Objects.equals(j.getName(), current[1])) {
|
||||||
end = j;
|
end = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user