|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnenok.lc.JoinTree
public abstract class JoinTree
This is the base class for the various join tree implementations. Each join tree class is equivalent to an architecture of local computation.
Nested Class Summary | |
---|---|
class |
JoinTree.Construction
Inner class wrapping all necessary data for the join tree construction process. |
Field Summary | |
---|---|
protected Allocator |
allocator
|
protected TaskFactory |
factory
|
protected Node |
root
|
Constructor Summary | |
---|---|
protected |
JoinTree(Knowledgebase kb,
Collection<Domain> queries,
Algorithm algo,
Processor proc)
Constructor: |
Method Summary | |
---|---|
Valuation |
answer(Domain query)
Method to answer a given query represented by a domain. |
void |
collect()
Executes the collect propagation. |
int |
countNodes()
|
abstract Node |
createNode()
|
void |
distribute(boolean... args)
Executes the distribute propagation. |
Allocator |
getAllocator()
|
abstract String |
getArchitecture()
|
double |
getCollectTime()
|
int |
getCommunicationCosts()
|
Algorithm |
getConstructionAlgorithm()
|
double |
getDistributeTime()
|
Domain |
getLargestDomain()
|
Set<Processor> |
getProcessorSet()
|
double |
getPropagationTime()
|
Collection<Domain> |
getQueries()
|
Node |
getRoot()
|
TaskFactory |
getTaskFactory()
|
Domain |
getTreeDomain()
|
boolean |
isBinary()
|
boolean |
isCollected()
|
boolean |
isDistributed()
|
Iterator<Node> |
iterator()
Jointrees can iterate over their nodes. |
void |
makeBinary()
Transforms this join tree to a binary join tree. |
void |
propagate(boolean... args)
Executes collect & distribute propagation. |
abstract void |
scale()
Performs the scaling operations for this architecture. |
void |
setAllocator(Allocator allocator)
Sets the jointree's processor allocation model. |
String |
toASCII(boolean content)
Prints the jointree as ASCII string. |
String |
toString()
|
abstract boolean |
verify(Class type)
Verifies that the given knowledgebase can indeed be used with this architecture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Node root
protected Allocator allocator
protected TaskFactory factory
Constructor Detail |
---|
protected JoinTree(Knowledgebase kb, Collection<Domain> queries, Algorithm algo, Processor proc) throws ConstrException, RemoteException
kb
- The knowledgebase covered by this join tree.queries
- The set of queries that are covered by this join tree.algo
- The construction algorithm.proc
- The processor assigned to query nodes.
ConstrException
- Exceptions thrown during the construction process.
RemoteException
- Exceptions caused by communication problems when accessing the query processor.Method Detail |
---|
public abstract void scale() throws VAException, RemoteException
Scalability
.
VAException
- Exception thrown while executing the scaling operation.
RemoteException
- Exceptions caused by communication problems when accessing the query processor.public abstract String getArchitecture()
public abstract boolean verify(Class type)
type
- The type of the locators that are contained in the knowledgebase.
true
, if the knowledgebase satifies the mathematical restrictions for this architecture.public abstract Node createNode()
public Collection<Domain> getQueries()
public void propagate(boolean... args) throws LCException, RemoteException
args
- args[0] = false
averts scaling if the
valuation algebra instance is of type Scalability
.
LCException
- Exception thrown during join tree propagation.
RemoteException
- Exceptions caused by communication problems when accessing processors.public void collect() throws LCException, RemoteException
LCException
- Exception thrown during join tree propagation.
RemoteException
- Exceptions caused by communication problems when accessing processors.public void distribute(boolean... args) throws LCException, RemoteException
args
- args[0] = false
averts scaling if the
valuation algebra instance is of type Scalability
.
LCException
- Exception thrown when trying to execute distribute before collect has been terminated.
RemoteException
- Exceptions caused by communication problems when accessing processors.public Valuation answer(Domain query) throws RemoteException
query
- The query to answer.
RemoteException
- Exceptions caused when trying to access the processor hosting the query answer.public double getCollectTime()
-1
, if collect has not yet been executed.public double getDistributeTime()
-1
, if distribute has not yet been executed.public double getPropagationTime()
-1
, if the propagation has not yet been executed.public TaskFactory getTaskFactory()
public void setAllocator(Allocator allocator)
allocator
- The new processor allocation model.public Allocator getAllocator()
public int getCommunicationCosts()
public Algorithm getConstructionAlgorithm()
public Set<Processor> getProcessorSet()
public Node getRoot()
public Iterator<Node> iterator()
iterator
in interface Iterable<Node>
Iterable.iterator()
public Domain getLargestDomain()
public Domain getTreeDomain()
public int countNodes()
public String toString()
toString
in class Object
Object.toString()
public String toASCII(boolean content)
content
- true
to print the content of each node.
public boolean isCollected()
true
, if the collect algorithm has been executed.public boolean isDistributed()
true
, if the distribute algorithm has been executed.public boolean isBinary()
true
, if this join tree is binary.public void makeBinary()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |