sources
Class ContinuousVariable

java.lang.Object
  extended bysources.Variable
      extended bysources.ContinuousVariable
Direct Known Subclasses:
DerivedContinuousVariable

public class ContinuousVariable
extends Variable

Class that represents a continuous Variable


Field Summary
 
Fields inherited from class sources.Variable
id, name
 
Constructor Summary
ContinuousVariable(double[] values, int length, int gen, java.lang.String nam, int identnr)
          Creates new ContinuousVariable
 
Method Summary
static ContinuousVariable createFromCatVar(CategorialVariable catVar)
          create ContinuousVariable from a CategorialVariable
 int getCount()
          returns the number of cases of this variable
 int getGen()
          return the number of characters to show
 double getIRQ()
          returns the IRQ of this variable
 double getMaximum()
          returns the maximum value of this varieble
 double getMean()
          returns the mean of this variable
 double getMedian()
          returns the median of this varieble
 double getMinimum()
          returns the minimum value of this variable
 double getSigma()
          returns the std error of this variable
 double[] getSortv()
          returns the sorted values of the variable
 java.lang.String getTextualRepresentation(int i)
          Returns the textual Representation of this case
 double getValueAt(int i)
          returns the value of case i
 double[] getValues()
          returns all values of this variable
 void setGen(int gen)
          Set the number of characters to show
 
Methods inherited from class sources.Variable
equals, getID, getName, getTextualRepresentations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContinuousVariable

public ContinuousVariable(double[] values,
                          int length,
                          int gen,
                          java.lang.String nam,
                          int identnr)
Creates new ContinuousVariable

Parameters:
identnr - the identity number of this variable
values - values in double
length - length of the variable
gen - Show gen characters, -1 show all characters
nam - Name of the variable
Method Detail

getCount

public int getCount()
returns the number of cases of this variable

Specified by:
getCount in class Variable
Returns:
the number of cases

getTextualRepresentation

public java.lang.String getTextualRepresentation(int i)
Returns the textual Representation of this case

Specified by:
getTextualRepresentation in class Variable
Parameters:
i - case to get the textual representation
Returns:
textual representation

getValueAt

public double getValueAt(int i)
returns the value of case i

Parameters:
i - index of case
Returns:
value of case

getValues

public double[] getValues()
returns all values of this variable

Returns:
values of this variable

getGen

public int getGen()
return the number of characters to show

Returns:
the number of characters

setGen

public void setGen(int gen)
Set the number of characters to show

Parameters:
gen - number of characters to show

createFromCatVar

public static ContinuousVariable createFromCatVar(CategorialVariable catVar)
create ContinuousVariable from a CategorialVariable

Parameters:
catVar - the CategorialVariable
Returns:
new ContinuousVariable
See Also:
CategorialVariable

getMinimum

public double getMinimum()
returns the minimum value of this variable

Returns:
the minimum value

getMaximum

public double getMaximum()
returns the maximum value of this varieble

Returns:
MAXIMUM VALUE

getMedian

public double getMedian()
returns the median of this varieble

Returns:
median of this variable

getMean

public double getMean()
returns the mean of this variable

Returns:
the mean

getSigma

public double getSigma()
returns the std error of this variable

Returns:
the std error

getIRQ

public double getIRQ()
returns the IRQ of this variable

Returns:
the IRQ

getSortv

public double[] getSortv()
returns the sorted values of the variable

Returns:
the sorted values