uk.ac.bbk.dcs.automed.qproc.optimise.optimisers
Class ConstantInPatternOptimiser
java.lang.Object
uk.ac.bbk.dcs.automed.qproc.optimise.Optimiser
uk.ac.bbk.dcs.automed.qproc.optimise.optimisers.ConstantInPatternOptimiser
public class ConstantInPatternOptimiser
- extends Optimiser
Detects equality filters between a var and a constant, deletes the filter and replaces the var in generators with the constant
- Author:
- Lucas Zamboulis
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantInPatternOptimiser
public ConstantInPatternOptimiser(QueryOptimisationProvider qop)
optimise
public boolean optimise(Cell c,
QueryProcessorConfiguration qpc)
throws QueryOptimisationException
- Specified by:
optimise
in class Optimiser
- Throws:
QueryOptimisationException
generateNewEquiFun
protected Cell generateNewEquiFun(Cell op,
Cell con,
Cell op1,
Cell op2)
generateNewEquiFunHelp
protected Cell generateNewEquiFunHelp(Cell op,
Cell con,
Cell opEqualOp,
Cell otherOp)
replaceVar
protected int replaceVar(Cell pat,
java.util.Map m)
- Go through pattern and replace var/tuple with constant if needed
- Parameters:
pat
- input patternm
- contains mappings between variables/tuples and constants
noVar
protected boolean noVar(Cell c)
main
public static void main(java.lang.String[] args)