eu.anorien.mhl
Interface HypothesesManager


public interface HypothesesManager

This is the class which controls most of the behavior of the library.


Method Summary
 void generateHypotheses(HypothesesGenerator generator, java.util.Set<Event> reqEvents, java.util.Set<Fact> reqFacts)
          Request an hypothesis generation.
 java.util.Collection<Hypothesis> getAllHypotheses()
          Returns all the hypotheses maintained by the library.
 Hypothesis getBestHypothesis()
          Returns the current best Hypothesis.
 void register(Watcher watcher)
          Register a watcher of the library.
 void setPruner(Pruner pruner)
          Sets the pruner which will be used to prune the clusters.
 void setRequiredPredicate(MayBeRequiredPredicate requiredPredicate)
          This predicate is used to identify clusters which will never be requested in the context of an hypothesis generation.
 

Method Detail

register

void register(Watcher watcher)
Register a watcher of the library. It will be notified of changes in the library.

Parameters:
watcher - The watcher to register.

generateHypotheses

void generateHypotheses(HypothesesGenerator generator,
                        java.util.Set<Event> reqEvents,
                        java.util.Set<Fact> reqFacts)
Request an hypothesis generation.

Parameters:
generator - The hypothesis generator which the library will invoke to generate the new hypotheses.
reqEvents - The events which the application needs to be available for this hypothesis generation.
reqFacts - The facts which the application needs to be available for this hypothesis generation.

getBestHypothesis

Hypothesis getBestHypothesis()
Returns the current best Hypothesis.

Returns:
The best Hypothesis.

getAllHypotheses

java.util.Collection<Hypothesis> getAllHypotheses()
Returns all the hypotheses maintained by the library.

Returns:
The all the maintained hypotheses.

setPruner

void setPruner(Pruner pruner)
Sets the pruner which will be used to prune the clusters. If more than one pruning strategy is to be used, you can create a composite pruner.

Parameters:
pruner - The new pruner.
See Also:
PrunerFactory

setRequiredPredicate

void setRequiredPredicate(MayBeRequiredPredicate requiredPredicate)

This predicate is used to identify clusters which will never be requested in the context of an hypothesis generation. These clusters occupy memory space needlessly and, ultimately, the application may crash without memory.

Parameters:
requiredPredicate - The new predicate.