cmdline
Class CmdLinearRegression

java.lang.Object
  extended by cmdline.CmdLinearRegression

public class CmdLinearRegression
extends java.lang.Object

Serves as interface between command line input and tools for calculation of linear regression

Author:
Stefanie Kaufmann

Field Summary
static java.lang.String STANDARD
           
 
Constructor Summary
CmdLinearRegression()
           
 
Method Summary
static void extractFlags(java.lang.String[] input)
          Translates the flags of the options array into values for the variables used for calculation
static Data getData(java.lang.String[] input)
          Uses the complete options array to split it and forward the necessary information to the interface for data manipulation
static boolean isValid()
          checks whether all essential variables have been set
static void main(java.lang.String[] args)
          Contains all necessary methods to calculate linear regression from an options array
static CorrectionFactors prepareLR(Data data)
          Contains all the methods for calculation of linear regression
static java.lang.String[] split(java.lang.String[] input)
          Splits the options array into one array that provides input for the data manipulation and one array that provides needed input for calculation of linear regression
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD

public static final java.lang.String STANDARD
See Also:
Constant Field Values
Constructor Detail

CmdLinearRegression

public CmdLinearRegression()
Method Detail

isValid

public static boolean isValid()
checks whether all essential variables have been set

Returns:
true if the options are valid, false otherwise

split

public static java.lang.String[] split(java.lang.String[] input)
Splits the options array into one array that provides input for the data manipulation and one array that provides needed input for calculation of linear regression

Parameters:
input - complete options array
Returns:
options array needed for data manipulation

extractFlags

public static void extractFlags(java.lang.String[] input)
Translates the flags of the options array into values for the variables used for calculation

Parameters:
input - options array containing only the important information

prepareLR

public static CorrectionFactors prepareLR(Data data)
Contains all the methods for calculation of linear regression

Parameters:
data - A data object for which the calculation should be done
Returns:
The Correction Factors returned from the linear regression

getData

public static Data getData(java.lang.String[] input)
                    throws InvalidFlagException
Uses the complete options array to split it and forward the necessary information to the interface for data manipulation

Parameters:
input - The complete options array
Returns:
The Data object received from data manipulation
Throws:
InvalidFlagException

main

public static void main(java.lang.String[] args)
Contains all necessary methods to calculate linear regression from an options array

Parameters:
args - The options array