nenok.lc.dp
Class DPJoinTree

java.lang.Object
  extended by nenok.lc.JoinTree
      extended by nenok.lc.dp.DPJoinTree
All Implemented Interfaces:
Iterable<Node>

public class DPJoinTree
extends JoinTree

The join tree corresponding to the dynamic programming architecture.

Version:
$LastChangedRevision: 557 $
$LastChangedDate: 2008-03-26 14:23:32 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Nested Class Summary
 
Nested classes/interfaces inherited from class nenok.lc.JoinTree
JoinTree.Construction
 
Field Summary
 
Fields inherited from class nenok.lc.JoinTree
adapter, root
 
Constructor Summary
DPJoinTree(Knowledgebase kb, Collection<Domain> queries, Algorithm algo)
          Constructor:
 
Method Summary
 Node createNode()
           
 String getArchitecture()
           
 Object[] getSolutionConfiguration(FiniteVariable[] vars)
          Rebuilds the solution configuration from the partial configurations stored in the nodes of the join tree.
 void scale()
          Performs the scaling operations for this architecture.
 boolean verify(Class type)
          Verifies that the given knowledgebase can indeed be used with this architecture.
 
Methods inherited from class nenok.lc.JoinTree
answer, collect, containsRemoteData, countNodes, distribute, getAdapter, getAllocator, getCollectTime, getConstructionAlgorithm, getConstructionData, getDistributeTime, getLargestDomain, getProcessorSet, getPropagationTime, getQueries, getRoot, getTreeDomain, isBinary, isCollected, isDistributed, iterator, makeBinary, propagate, setRoot, toASCII, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DPJoinTree

public DPJoinTree(Knowledgebase kb,
                  Collection<Domain> queries,
                  Algorithm algo)
           throws ConstrException
Constructor:

Parameters:
kb - The knowledgebase from which this jointree is constructed.
queries - The set of queries that are covered by this join tree.
algo - The construction algorithm.
Throws:
ConstrException - Exceptions throws during construction process.
RemoteException - Exceptions caused by communication problems when accessing the query processor.
Method Detail

createNode

public Node createNode()
Specified by:
createNode in class JoinTree
Returns:
Returns a new node instance corresponding to the architecture type of this jointree.
See Also:
JoinTree.createNode()

getArchitecture

public String getArchitecture()
Specified by:
getArchitecture in class JoinTree
Returns:
The join tree's architecture type.
See Also:
JoinTree.getArchitecture()

getSolutionConfiguration

public Object[] getSolutionConfiguration(FiniteVariable[] vars)
                                  throws LCException
Rebuilds the solution configuration from the partial configurations stored in the nodes of the join tree. Note that this method presupposes that a full propagation has been executed.

Parameters:
vars - The variable array that defines the output configuration's order.
Returns:
A solution configuration built by the dynamic programming architecture.
Throws:
LCException - Exception thrown if propagation has not been executed.

scale

public void scale()
           throws VAException
Description copied from class: JoinTree
Performs the scaling operations for this architecture. This method is executed, if the valuations are of type Scalability.

Specified by:
scale in class JoinTree
Throws:
VAException
See Also:
Scaling is impossible since otherwise, the identification of solution configurations will fail.

verify

public boolean verify(Class type)
Description copied from class: JoinTree
Verifies that the given knowledgebase can indeed be used with this architecture.

Specified by:
verify in class JoinTree
Parameters:
type - The type of the locators that are contained in the knowledgebase.
Returns:
true, if the knowledgebase satifies the mathematical restrictions for this architecture.
See Also:
JoinTree.verify(java.lang.Class)