Class MetaMinerBasedSorter

  • All Implemented Interfaces:
    java.util.Comparator<ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode>

    public class MetaMinerBasedSorter
    extends java.lang.Object
    implements java.util.Comparator<ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode>
    A Comparator for TFDNodes that sorts based on meta information about the underlying ComponentInstance of the node and possibly application context.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o1, ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o2)  
      protected ComponentInstance convertToComponentInstance​(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode node)
      Converts the given TFDNode to a ComponentInstance.
      IMetaMiner getMetaminer()
      Gets the IMetaMiner, which is used to derive a score for a given TFDNode based on its attached ComponentInstance.
      void setMetaminer​(IMetaMiner metaminer)
      Sets the IMetaMiner, which is used to derive a score for a given TFDNode based on its attached ComponentInstance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • MetaMinerBasedSorter

        public MetaMinerBasedSorter​(IMetaMiner metaminer,
                                    java.util.Collection<Component> components)
    • Method Detail

      • compare

        public int compare​(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o1,
                           ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o2)
        Specified by:
        compare in interface java.util.Comparator<ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode>
      • convertToComponentInstance

        protected ComponentInstance convertToComponentInstance​(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode node)
        Converts the given TFDNode to a ComponentInstance.
        Parameters:
        node - The TFDNode to convert
        Returns:
        The TFDNode as a ComponentInstance
      • getMetaminer

        public IMetaMiner getMetaminer()
        Gets the IMetaMiner, which is used to derive a score for a given TFDNode based on its attached ComponentInstance.
        Returns:
        The meta miner
      • setMetaminer

        public void setMetaminer​(IMetaMiner metaminer)
        Sets the IMetaMiner, which is used to derive a score for a given TFDNode based on its attached ComponentInstance.
        Parameters:
        metaminer - The meta miner