Class Algorithm

java.lang.Object
pt.ist.phylolib.command.algorithm.Algorithm
All Implemented Interfaces:
ICommand<Matrix,Tree>
Direct Known Subclasses:
Edmonds, GloballyClosestPairs, GoeBURST, GoeBURSTFullMST, NeighbourJoining

public abstract class Algorithm extends Object implements ICommand<Matrix,Tree>
Responsible for calculating a phylogenetic tree from a distance matrix.
  • Constructor Details

    • Algorithm

      public Algorithm()
  • Method Details

    • requiredDistanceScope

      public DistanceScope requiredDistanceScope()
      Declares the distance scope this algorithm needs. Complete is the conservative default until an algorithm proves a bounded scope.
    • configureRequiredDistanceScope

      public void configureRequiredDistanceScope(Options options)
      Configures a scope that depends on user input before the matrix is loaded. Most algorithms have a fixed requirement and do nothing here.
    • process

      public Tree process(Matrix matrix)
      Description copied from interface: ICommand
      Processes this command's input data into an output data.
      Specified by:
      process in interface ICommand<Matrix,Tree>
      Parameters:
      matrix - the input data of this command
      Returns:
      the output data resultant from processing the input data with this command
    • processImpl

      protected abstract Tree processImpl(Matrix matrix)
      Processes the matrix to create a phylogenetic tree. Subclasses should implement their specific algorithm logic here.
      Parameters:
      matrix - the distance matrix
      Returns:
      the computed phylogenetic tree