Klasse OurAlgorithm

java.lang.Object
logging.Algorithm
OurApplication.OurAlgorithm

public class OurAlgorithm extends Algorithm
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:
  • Felddetails

  • Konstruktordetails

    • OurAlgorithm

      public OurAlgorithm()
      Standard constructor. Initializes an instance of OurAlgorithm.
    • OurAlgorithm

      public OurAlgorithm(OurParameterArea parameterArea, OurMethodButtons methodButtons)
      Constructs a summation algorithm with parameters from the parameter area.
      Parameter:
      parameterArea - the parameter area providing the selected graph for the algorithm
      methodButtons - 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).
      Angegeben von:
      run in Klasse Algorithm
      Gibt zurück:
      a LogElementList containing the single steps of the algorithm processing
    • setCurrentGraph

      public void setCurrentGraph(Graph<VertexMarking,EdgeMarking> graph)
      Sets the current graph for the algorithm.
      Parameter:
      graph - the graph to be set as the current graph