nenok.va
Interface Predictability

All Superinterfaces:
Labeled, Serializable, Valuation
All Known Implementing Classes:
OSRValuation, SRValuation

public interface Predictability
extends Valuation

This interface makes a valuation algebra weight predictable. Weight predictors only depend on the domain of a valuation and not on the valuation object itself. One must be able to call the weight predictor, even if no corresponding valuation exists. This actually demands a static implementation. On the other hand, each valuation algebra possesses its own weight predictor, which makes the static design approach impossible.

The workaround presented here is simple. We create weight predictors as an external object and this class simply returns such an object that effectively computes the weight. Doing so, we may give a pre-implementation of the weight function within this class' implementor. Use it in the following way: public int weight() { return Predictability.Implementor.getInstance().weight(this); }

Version:
$LastChangedRevision: 559 $
$LastChangedDate: 2008-03-26 14:25:18 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Nested Class Summary
static class Predictability.Implementor
          Delegator class for the Predictability interface.
 
Method Summary
 Predictor predictor()
           
 
Methods inherited from interface nenok.va.Valuation
combine, marginalize, weight
 
Methods inherited from interface nenok.adapt.Labeled
label
 

Method Detail

predictor

Predictor predictor()
Returns:
A predictor instance corresponding to this valuation algebra.