org.dllearner.refinementoperators
Class OperatorInverter

java.lang.Object
  extended by org.dllearner.refinementoperators.OperatorInverter
All Implemented Interfaces:
RefinementOperator

public class OperatorInverter
extends Object
implements RefinementOperator

The class uses an existing refinement operator and inverts it, i.e. a downward refinement operator is turned into an upward refinement operator and vice versa.

Author:
Jens Lehmann

Constructor Summary
OperatorInverter(RefinementOperator operator)
           
 
Method Summary
 Set<Description> refine(Description description)
          Standard refinement operation.
 Set<Description> refine(Description description, int maxLength)
          Optional refinement operation, where the learning algorithm can specify an additional bound on the length of descriptions.
 Set<Description> refine(Description description, int maxLength, List<Description> knownRefinements)
          Optional refinement operation, where the learning algorithm can specify an additional bound on the length of descriptions and a list of known refinements, which do not need to be returned.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorInverter

public OperatorInverter(RefinementOperator operator)
Method Detail

refine

public Set<Description> refine(Description description)
Description copied from interface: RefinementOperator
Standard refinement operation.

Specified by:
refine in interface RefinementOperator
Parameters:
description - The description, which will be refined.
Returns:
A set of refinements.

refine

public Set<Description> refine(Description description,
                               int maxLength)
Description copied from interface: RefinementOperator
Optional refinement operation, where the learning algorithm can specify an additional bound on the length of descriptions.

Specified by:
refine in interface RefinementOperator
Parameters:
description - The description, which will be refined.
maxLength - The maximum length of returned description, where length is defined by KBElement.getLength().
Returns:
A set of refinements obeying the above restrictions.

refine

public Set<Description> refine(Description description,
                               int maxLength,
                               List<Description> knownRefinements)
Description copied from interface: RefinementOperator
Optional refinement operation, where the learning algorithm can specify an additional bound on the length of descriptions and a list of known refinements, which do not need to be returned.

Specified by:
refine in interface RefinementOperator
Parameters:
description - The description, which will be refined.
maxLength - The maximum length of returned description, where length is defined by KBElement.getLength().
knownRefinements - A collection of known refinements, which do not need to be returned.
Returns:
A set of refinements obeying the above restrictions.


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann