org.deri.iris.optimisations.magicsets
Class MagicSets
java.lang.Object
org.deri.iris.optimisations.magicsets.MagicSets
- All Implemented Interfaces:
- IProgramOptimisation
public final class MagicSets
- extends Object
- implements IProgramOptimisation
Simple implementation of the "Generalized Magic Sets" according to
the "The Power of Magic" paper.
- Author:
- Richard P??ttler (richard dot poettler at deri sti2 at)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MagicSets
public MagicSets()
optimise
public IProgramOptimisation.Result optimise(Collection<IRule> rules,
IQuery query)
- Description copied from interface:
IProgramOptimisation
- Applies the optimisation algorithm to a set of rules. A
Result which
contains the transformed rules and the adjusted query.
- Specified by:
optimise in interface IProgramOptimisation
- Parameters:
rules - the rules to transformquery - the query for which to transform the rules
- Returns:
- a optimisation result or
null, if the
transformation failed.