Package ai.libs.hasco.metamining
Class MetaMinerBasedSorter
- java.lang.Object
-
- ai.libs.hasco.metamining.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 forTFDNodes that sorts based on meta information about the underlyingComponentInstanceof the node and possibly application context.
-
-
Constructor Summary
Constructors Constructor Description MetaMinerBasedSorter(IMetaMiner metaminer, java.util.Collection<Component> components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o1, ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode o2)protected ComponentInstanceconvertToComponentInstance(ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode node)Converts the given TFDNode to a ComponentInstance.IMetaMinergetMetaminer()Gets theIMetaMiner, which is used to derive a score for a givenTFDNodebased on its attachedComponentInstance.voidsetMetaminer(IMetaMiner metaminer)Sets theIMetaMiner, which is used to derive a score for a givenTFDNodebased on its attachedComponentInstance.
-
-
-
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:
comparein interfacejava.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 theIMetaMiner, which is used to derive a score for a givenTFDNodebased on its attachedComponentInstance.- Returns:
- The meta miner
-
setMetaminer
public void setMetaminer(IMetaMiner metaminer)
Sets theIMetaMiner, which is used to derive a score for a givenTFDNodebased on its attachedComponentInstance.- Parameters:
metaminer- The meta miner
-
-