Class CommandLine<C extends CostModel,​P extends InputParser>

  • Type Parameters:
    C - type of cost model.
    P - type of input parser.

    public class CommandLine<C extends CostModel,​P extends InputParser>
    extends Object
    This is the command line interface for executing APTED algorithm.
    See Also:
    CostModel, InputParser
    • Field Detail

      • run

        private boolean run
      • custom

        private boolean custom
      • array

        private boolean array
      • strategy

        private boolean strategy
      • ifSwitch

        private boolean ifSwitch
      • sota

        private boolean sota
      • verbose

        private boolean verbose
      • demaine

        private boolean demaine
      • mapping

        private boolean mapping
      • sotaStrategy

        private int sotaStrategy
      • customStrategy

        private String customStrategy
      • customStrategyArrayFile

        private String customStrategyArrayFile
      • rted

        private APTED rted
      • costModel

        private final C extends CostModel costModel
      • inputParser

        private final P extends InputParser inputParser
    • Constructor Detail

      • CommandLine

        public CommandLine​(C costModel,
                           P inputParser)
        Constructs the command line. Initialises the cost model and input parser of specific types.
        Parameters:
        costModel - instance of a specific cost model.
        inputParser - instance of a specific inputParser.
        See Also:
        CostModel, InputParser
    • Method Detail

      • main

        public static void main​(String[] args)
        Main method, invoced when executing the jar file.
        Parameters:
        args - array of command line arguments passed when executing jar file.
      • runCommandLine

        public void runCommandLine​(String[] args)
        Run the command line with given arguments.
        Parameters:
        args - array of command line arguments passed when executing jar file.
      • parseTreesFromCommandLine

        private void parseTreesFromCommandLine​(String ts1,
                                               String ts2)
        Parse two input trees from the command line and convert them to tree representation using AptedNode class.
        Parameters:
        ts1 - source input tree as string.
        ts2 - destination input tree as string.
        See Also:
        AptedNode
      • parseTreesFromFiles

        private void parseTreesFromFiles​(String fs1,
                                         String fs2)
        Parses two input trees from given files and convert them to tree representation using AptedNode class.
        Parameters:
        fs1 - path to file with source tree.
        fs2 - path to file with destination tree.
        See Also:
        AptedNode