uk.ac.gla.dcs.renaissance.iqir.query
Interface Operator

All Known Implementing Classes:
Mixture, MultiTermOperator, Projection, RFOperator, TermOperator

public interface Operator


Method Summary
 void addINSamplingQueries(Set<String> set)
          Add the queries that will be used to compute base densities.
 void addTerms(Set<String> set)
          Add the terms
 void applyToSuboperators(OperatorTransformer transformer)
          Apply the transformation to all sub-operators
 WeightedVectorSet compute(boolean needsSum, bpiwowar.log.TaskTimer timer)
          Computes the density.
 Operator copy()
          Deep copy of this operator
 Iterable<Operator> getSubOperators()
          Get all the suboperators (used to process recursively all the nodes of a query).
 void init(Informations informations)
          Initialise this operator so as to prepare computation
 boolean isNull()
          Returns true if the density is null (e.g., stopped term).
 Operator simplify()
          Simplify this operator (calls simplify recursively).
 

Method Detail

init

void init(Informations informations)
Initialise this operator so as to prepare computation


addINSamplingQueries

void addINSamplingQueries(Set<String> set)
Add the queries that will be used to compute base densities. The syntax of the queries can be found in in the MG4J API.

Parameters:
set - The base queries should be added to this set

compute

WeightedVectorSet compute(boolean needsSum,
                          bpiwowar.log.TaskTimer timer)
                          throws Throwable
Computes the density. The object will be first initialised with init(Informations)

Parameters:
needsSum - If the sum of vectors is needed
timer - A timer to give information about the task progress
Returns:
A density with the sum
Throws:
Throwable - if something goes wrong

isNull

boolean isNull()
Returns true if the density is null (e.g., stopped term). The object should have been initialised before with init(Informations)


simplify

Operator simplify()
Simplify this operator (calls simplify recursively). The object should be initialised with init(Informations)


addTerms

void addTerms(Set<String> set)
Add the terms

Parameters:
set - The set of terms

getSubOperators

Iterable<Operator> getSubOperators()
Get all the suboperators (used to process recursively all the nodes of a query). No special order is expected between nodes.


copy

Operator copy()
Deep copy of this operator


applyToSuboperators

void applyToSuboperators(OperatorTransformer transformer)
Apply the transformation to all sub-operators



Copyright © 2011. All Rights Reserved.