nenok.adapt
Interface Adapter

All Known Implementing Classes:
LocalAdapter, RemoteAdapter

public interface Adapter

An adapter class that allows to process local and remote valuations in a uniform manner. Additionally, this class counts the number of executed operations.

Version:
$LastChangedRevision: 552 $
$LastChangedDate: 2008-03-26 14:17:19 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Method Summary
 Labeled combine(Labeled factor, Labeled... factors)
          Combination operation.
 int getCombinations()
           
 int getInverses()
           
 int getMarginalizations()
           
 Labeled inverse(Labeled factor)
          Inverse operation.
 Labeled marginalize(Labeled factor, Domain dom)
          Marginalization operation.
 

Method Detail

inverse

Labeled inverse(Labeled factor)
                throws LCException
Inverse operation.

Parameters:
factor - The factor whose inverse has to be computed.
Returns:
The inverse of the factor.
Throws:
LCException - Generic local computation exception.

combine

Labeled combine(Labeled factor,
                Labeled... factors)
                throws LCException
Combination operation.

Parameters:
factor - The first factor of the combination. Important: in case of a remotely processed combination, this argument determined the processor which executes the combination.
factors - The remaining factors to be combined.
Returns:
The combination of all factors given as argument. The implementation of this combination should respect the array's order.
Throws:
LCException - Generic local computation exception.

marginalize

Labeled marginalize(Labeled factor,
                    Domain dom)
                    throws LCException
Marginalization operation.

Parameters:
factor - The factor to be marginalized.
dom - The domain onto the marginalization is performed.
Returns:
The marginal of the argument relativ to the given domain.
Throws:
LCException - Generic local computation exception.

getCombinations

int getCombinations()
Returns:
Returns the number of combinations.

getInverses

int getInverses()
Returns:
Returns the number of inverses.

getMarginalizations

int getMarginalizations()
Returns:
Returns the number of marginalizations.