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 forTFDNode
s that sorts based on meta information about the underlyingComponentInstance
of 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 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 theIMetaMiner
, which is used to derive a score for a givenTFDNode
based on its attachedComponentInstance
.void
setMetaminer(IMetaMiner metaminer)
Sets theIMetaMiner
, which is used to derive a score for a givenTFDNode
based 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:
compare
in 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 givenTFDNode
based on its attachedComponentInstance
.- Returns:
- The meta miner
-
setMetaminer
public void setMetaminer(IMetaMiner metaminer)
Sets theIMetaMiner
, which is used to derive a score for a givenTFDNode
based on its attachedComponentInstance
.- Parameters:
metaminer
- The meta miner
-
-