Class RuntimeComparison


  • public class RuntimeComparison
    extends Object
    • Constructor Detail

      • RuntimeComparison

        public RuntimeComparison()
    • Method Detail

      • comparePlans

        public static int comparePlans​(Plan newPlan,
                                       Plan bestPlan)
        Compares two plans based on their runtime estimation.
        Parameters:
        newPlan - , the first plan
        bestPlan - , the second plan
        Returns:
        0 if both plans have the same estimated runtime, a value below 0 if newPlan is faster than the oldPlan, and a value above 0 if the oldPlan is faster that the newPlan
      • sortLinkSpecifications

        public static LinkedList<PartialRecallRefinementNode> sortLinkSpecifications​(HashMap<LinkSpecification,​Plan> plans)
        Sorts a map of link specifications in ascending order based on the runtime estimations of their corresponding plans. To secure the deterministic nature of the function, if two link specifications have the same runtime estimation, the function compares the String representation of the link specifications.
        Parameters:
        plans - , a map of Link Specifications and their corresponding plans
        Returns:
        an ordered list of link specifications the runtime estimations of their corresponding plans