hyspirit.engines
Class HyFreq2MDSEngine

java.lang.Object
  extended by hyspirit.engines.HyEngine
      extended by hyspirit.engines.HyFreq2MDSEngine
All Implemented Interfaces:
java.lang.Runnable

public class HyFreq2MDSEngine
extends HyEngine

Author:
Ingo Frommholz

Created on 14-Feb-2006 01:15:04


Field Summary
 
Fields inherited from class hyspirit.engines.HyEngine
argumentString, LOG, stdin, TIME_PREFIX
 
Constructor Summary
HyFreq2MDSEngine()
          This constructor tries to determine the HySpirit environment automatically
HyFreq2MDSEngine(HySpiritProperties hyspirit)
          This constructor must be used if you are going to start your own engine process (client/server mode).
 
Method Summary
 void addColumn(int column)
          Adds a column forming the frequency key.
 void addLambda(float lambda)
          Adds a lambda value.
 void addMDSFile(java.lang.String filename)
          Add a file to read the MDS data from.
 void assumeApoissonDistribution()
          Assume an apoisson distribution for the probability estimation.
 void assumeDisjointDistribution()
          Assume a disjoint distribution for the probability estimation.
 void assumeExponentialDistribution()
          Assume an exponential distribution for the probability estimation.
 void assumeIndependentDistribution()
          Assume an independent distribution for the probability estimation.
 void assumePivotedDistribution()
          Assume a pivoted distribution for the probability estimation.
 void assumePoissonDistribution()
          Assume a poisson distribution for the probability estimation.
 void assumeSumDistribution()
          Same as assumeDisjointDistribution.
protected  java.lang.String[] buildCommand()
          Builds the command from the parameters.
 void reset()
          Resets all parameters of the engine after destroying a possibly running process.
 void setAvg(boolean avg)
          Whether or not to use average for Poisson estimations.
 void setExponent(float exponent)
          The exponent applied to the probability.
 void setIntervalExponent(float intervalExp)
          Sets the interval exponent for Poisson distribution.
 void setStream(boolean stream)
          Sets or unsets the -stream option.
 void useMaxIDFNorm()
          Use max_idf norm.
 void useMaxMinIDFNorm()
          Use maxmin_idf norm.
 void useMaxMinNorm()
          Use maxmin norm.
 void useMaxNorm()
          Use max norm.
 void usePivotedNorm()
          Use pivoted norm.
 void useSumIDFNorm()
          Use sum_idf norm.
 void useSumNorm()
          Use sum norm.
 
Methods inherited from class hyspirit.engines.HyEngine
closeSTDIN, destroy, echoSpecial, exitValue, getCommand, getEngineName, getInputReader, getOutputWriter, getPercentageCPU, getRealTime, getSTDERR, getSTDIN, getSTDOUT, getStreamEndMessage, getSysTime, getUserTime, hasNext, isInClientMode, isRunning, kb, kb, kb, next, readFromSTDIN, restart, run, send, send, sendAndReceive, sendFile, setArgumentString, setLogger, start, suppressSTDERR, takesTime, takeTime, waitFor, waitTillRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyFreq2MDSEngine

public HyFreq2MDSEngine()
                 throws HySpiritException
This constructor tries to determine the HySpirit environment automatically

Throws:
HySpiritException - if the HySiprit environment cannot be determined

HyFreq2MDSEngine

public HyFreq2MDSEngine(HySpiritProperties hyspirit)
                 throws HySpiritException
This constructor must be used if you are going to start your own engine process (client/server mode).

Parameters:
hyspirit - the HySpirit properties containing the environment
Throws:
HySpiritException - if we can't determine the environment
Method Detail

addColumn

public void addColumn(int column)
Adds a column forming the frequency key. Note that the order of adding columns does matter. See hy_freq2mds manual for further details.

Parameters:
column - the column

useMaxNorm

public void useMaxNorm()
Use max norm. See hy_freq2mds manual for further details.


useMaxIDFNorm

public void useMaxIDFNorm()
Use max_idf norm. See hy_freq2mds manual for further details.


useSumNorm

public void useSumNorm()
Use sum norm. See hy_freq2mds manual for further details.


useSumIDFNorm

public void useSumIDFNorm()
Use sum_idf norm. See hy_freq2mds manual for further details.


useMaxMinNorm

public void useMaxMinNorm()
Use maxmin norm. See hy_freq2mds manual for further details.


useMaxMinIDFNorm

public void useMaxMinIDFNorm()
Use maxmin_idf norm. See hy_freq2mds manual for further details.


usePivotedNorm

public void usePivotedNorm()
Use pivoted norm. See hy_freq2mds manual for further details.


setExponent

public void setExponent(float exponent)
The exponent applied to the probability. See hy_freq2mds manual for further details. Default: 1

Parameters:
exponent -

assumeDisjointDistribution

public void assumeDisjointDistribution()
Assume a disjoint distribution for the probability estimation. See hy_freq2mds manual for further details.


assumeSumDistribution

public void assumeSumDistribution()
Same as assumeDisjointDistribution.


assumeApoissonDistribution

public void assumeApoissonDistribution()
Assume an apoisson distribution for the probability estimation. See hy_freq2mds manual for further details.


assumePivotedDistribution

public void assumePivotedDistribution()
Assume a pivoted distribution for the probability estimation. See hy_freq2mds manual for further details.


assumeIndependentDistribution

public void assumeIndependentDistribution()
Assume an independent distribution for the probability estimation. See hy_freq2mds manual for further details.


assumeExponentialDistribution

public void assumeExponentialDistribution()
Assume an exponential distribution for the probability estimation. See hy_freq2mds manual for further details.


assumePoissonDistribution

public void assumePoissonDistribution()
Assume a poisson distribution for the probability estimation. See hy_freq2mds manual for further details.


addLambda

public void addLambda(float lambda)
Adds a lambda value. See hy_freq2mds manual for further details.

Parameters:
lambda -

setAvg

public void setAvg(boolean avg)
Whether or not to use average for Poisson estimations. Make sure that the average freqency is contained in the input (file or STDIN). See hy_freq2mds manual for further details.

Parameters:
avg -

setIntervalExponent

public void setIntervalExponent(float intervalExp)
Sets the interval exponent for Poisson distribution. See hy_freq2mds manual for further details.

Parameters:
intervalExp - the interval exponent

setStream

public void setStream(boolean stream)
Sets or unsets the -stream option. See hy_freq2mds manual for further details.

Parameters:
stream - true if stream option should be set, false for nostream option

addMDSFile

public void addMDSFile(java.lang.String filename)
Add a file to read the MDS data from.

Parameters:
filename - the name of the MDS file

reset

public void reset()
Resets all parameters of the engine after destroying a possibly running process. You have to restart the process with run().

Overrides:
reset in class HyEngine

buildCommand

protected java.lang.String[] buildCommand()
Builds the command from the parameters.

Overrides:
buildCommand in class HyEngine
Returns:
the command string array