Package OurApplication
Klasse OurAlgorithm
java.lang.Object
logging.Algorithm
OurApplication.OurAlgorithm
This class provides an example of using logging.Algorithm.
It implements a summation algorithm that computes the sum of integers starting from 0 up to a specified maximum value from the parameter area.
- Siehe auch:
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprivate Graph
<VertexMarking, EdgeMarking> private OurMethodButtons
Von Klasse geerbte Felder logging.Algorithm
parameterArea, title
-
Konstruktorübersicht
KonstruktorBeschreibungStandard constructor.OurAlgorithm
(OurParameterArea parameterArea, OurMethodButtons methodButtons) Constructs a summation algorithm with parameters from the parameter area. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungrun()
Overridden method from the superclass.void
setCurrentGraph
(Graph<VertexMarking, EdgeMarking> graph) Sets the current graph for the algorithm.Von Klasse geerbte Methoden logging.Algorithm
getParameterArea, getTitle, setParameterArea, setTitle
-
Felddetails
-
currentGraph
-
methodButtons
-
-
Konstruktordetails
-
OurAlgorithm
public OurAlgorithm()Standard constructor. Initializes an instance of OurAlgorithm. -
OurAlgorithm
Constructs a summation algorithm with parameters from the parameter area.- Parameter:
parameterArea
- the parameter area providing the selected graph for the algorithmmethodButtons
- the method buttons determining the algorithm type (Dijkstra or A-Star)
-
-
Methodendetails
-
run
Overridden method from the superclass. Executes the summation algorithm. Computes the shortest path in the current graph based on the selected method (Dijkstra or A-Star). -
setCurrentGraph
Sets the current graph for the algorithm.- Parameter:
graph
- the graph to be set as the current graph
-