uk.ac.ic.doc.automed.p2p.util.topk
Class JStar

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.util.topk.JStar

public class JStar
extends java.lang.Object


Field Summary
private  boolean debug
           
private  java.util.List inputStreams
           
private  TupleJValidator jvalid
           
private  int k
           
private static java.lang.String line
           
private  java.util.List queue
           
private  FRank rankf
           
 
Constructor Summary
JStar(java.util.List inputStreams, TupleJValidator validator, FRank rankf, int k)
          Instantiate an algorithm with a collection of input streams
 
Method Summary
protected  boolean assignNextMatch(JNode node)
          Shift and assign the variable pointer to the next tuple in the stream which is to be processed.
Return true if it is a valid assignment, or false if otherwise.
protected  JNode getNextMatch()
          Pop out the next item from the queue to process
private  void init()
          Initialise the queue
protected  boolean shiftNextMatch(JNode node)
          Shift the variable pointer to the next tuple in the stream which is to be processed
 java.util.Collection start()
          Start the algorithm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStreams

private java.util.List inputStreams

queue

private java.util.List queue

jvalid

private TupleJValidator jvalid

rankf

private FRank rankf

k

private int k

debug

private boolean debug

line

private static final java.lang.String line
See Also:
Constant Field Values
Constructor Detail

JStar

public JStar(java.util.List inputStreams,
             TupleJValidator validator,
             FRank rankf,
             int k)
Instantiate an algorithm with a collection of input streams

Parameters:
input -
Method Detail

init

private void init()
Initialise the queue


start

public java.util.Collection start()
Start the algorithm

Returns:

getNextMatch

protected JNode getNextMatch()
Pop out the next item from the queue to process

Returns:

shiftNextMatch

protected boolean shiftNextMatch(JNode node)
Shift the variable pointer to the next tuple in the stream which is to be processed


assignNextMatch

protected boolean assignNextMatch(JNode node)
Shift and assign the variable pointer to the next tuple in the stream which is to be processed.
Return true if it is a valid assignment, or false if otherwise.