FaDe
Class FeatureCalculator

java.lang.Object
  extended by FaDe.FeatureCalculator

public class FeatureCalculator
extends java.lang.Object

The FeatureCalculator class is used to calculate features describing user's behaviour in using mouse and keyboard. First the class has to be filled with data by calling either the collectData or the useDataFromLogger(logger) methods. Than any feature can be obtained with the getFeature(feature) method, or the whole set of features can be obtained with the getFeatureSet() method.


Constructor Summary
FeatureCalculator()
          Class constructor.
 
Method Summary
 void collectData()
          Causes the class to collect user input data for the default time.
 void collectData(int minutes)
          Causes the class to collect user input data for the specified minutes.
 java.lang.Double getFeature(FeatureSet.Feature feature)
          Calculates and returns the specified feature value.
 FeatureSet getFeatureSet()
          Calculate and returns the entire FeatureSet.
 void useDataFromLogger(Logger logger)
          Adds a previously collected log to be used for feature calculation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureCalculator

public FeatureCalculator()
Class constructor.

Method Detail

collectData

public void collectData()
Causes the class to collect user input data for the default time. The method is blocking.


collectData

public void collectData(int minutes)
Causes the class to collect user input data for the specified minutes. The method is blocking.

Parameters:
minutes - the minutes to collect data for

useDataFromLogger

public void useDataFromLogger(Logger logger)
Adds a previously collected log to be used for feature calculation. This method is alternative to collectData.

Parameters:
logger - the previously collected log

getFeature

public java.lang.Double getFeature(FeatureSet.Feature feature)
Calculates and returns the specified feature value.

Parameters:
feature - the feature to return
Returns:
the specified feature value

getFeatureSet

public FeatureSet getFeatureSet()
Calculate and returns the entire FeatureSet.

Returns:
the entire FeatureSet