edu.cs.ai.kreator.logic.probabilities
Class CombiningRule

java.lang.Object
  extended by edu.cs.ai.kreator.logic.probabilities.CombiningRule
Direct Known Subclasses:
CrAverage, CrIdentity, CrNoisyAnd, CrNoisyOr, CrSmoothedNoisyAnd, CrSmoothedNoisyOr

public abstract class CombiningRule
extends java.lang.Object

This interface models a combining rule for bayesian predicates. It maps a set of cpds to a single cpd.

Author:
Matthias Thimm

Field Summary
static java.lang.String AVERAGE
           
static java.lang.String IDENTITY
           
static java.lang.String NOISYAND
           
static java.lang.String NOISYOR
           
 
Constructor Summary
CombiningRule()
           
 
Method Summary
 java.lang.Double combine(java.lang.Double value1, java.lang.Double value2)
          Combines the two given values to one value.
abstract  java.lang.Double combine(java.util.LinkedList<java.lang.Double> values)
          Combines the given values to one value.
abstract  Cpd combine(java.util.List<Cpd> cpds)
          This method combines a set of CPDs to a single CPD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOISYOR

public static final java.lang.String NOISYOR
See Also:
Constant Field Values

AVERAGE

public static final java.lang.String AVERAGE
See Also:
Constant Field Values

IDENTITY

public static final java.lang.String IDENTITY
See Also:
Constant Field Values

NOISYAND

public static final java.lang.String NOISYAND
See Also:
Constant Field Values
Constructor Detail

CombiningRule

public CombiningRule()
Method Detail

combine

public abstract Cpd combine(java.util.List<Cpd> cpds)
                     throws QueryException
This method combines a set of CPDs to a single CPD.

Parameters:
cpds - a set of cpds
Returns:
a cpd
Throws:
QueryException

combine

public abstract java.lang.Double combine(java.util.LinkedList<java.lang.Double> values)
                                  throws QueryException
Combines the given values to one value.

Parameters:
values - a list of Doubles.
Returns:
a Double
Throws:
QueryException

combine

public java.lang.Double combine(java.lang.Double value1,
                                java.lang.Double value2)
                         throws QueryException
Combines the two given values to one value.

Parameters:
value1 - a Double.
value2 - a Double.
Returns:
a Double.
Throws:
QueryException