Package weka.experiment
Class ResultMatrix
- java.lang.Object
-
- weka.experiment.ResultMatrix
-
- All Implemented Interfaces:
java.io.Serializable,OptionHandler,RevisionHandler
- Direct Known Subclasses:
ResultMatrixCSV,ResultMatrixGnuPlot,ResultMatrixHTML,ResultMatrixLatex,ResultMatrixPlainText,ResultMatrixSignificance
public abstract class ResultMatrix extends java.lang.Object implements java.io.Serializable, RevisionHandler, OptionHandler
This matrix is a container for the datasets and classifier setups and their statistics. Derived classes output the data in different formats. Derived classes need to implement the following methods:toStringMatrix()toStringKey()toStringHeader()toStringSummary()toStringRanking()
- Version:
- $Revision: 13956 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
toStringMatrix(),toStringKey(),toStringHeader(),toStringSummary(),toStringRanking(), Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringLEFT_PARENTHESESthe left parentheses for enumerating cols/rows.java.lang.StringLOSS_STRINGloss string.java.lang.StringRIGHT_PARENTHESESthe right parentheses for enumerating cols/rows.static intSIGNIFICANCE_LOSSloss.static intSIGNIFICANCE_TIEtie.static intSIGNIFICANCE_WINwin.java.lang.StringTIE_STRINGtie string.java.lang.StringWIN_STRINGwin string.
-
Constructor Summary
Constructors Constructor Description ResultMatrix()initializes the matrix as 1x1 matrix.ResultMatrix(int cols, int rows)initializes the matrix with the given dimensions.ResultMatrix(ResultMatrix matrix)initializes the matrix with the values from the given matrix.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddHeader(java.lang.String key, java.lang.String value)adds the key-value pair to the header.voidassign(ResultMatrix matrix)acquires the data from the given matrix.voidclear()removes the stored data and the ordering, but retains the dimensions of the matrix.voidclearHeader()removes all the header information.voidclearRanking()clears the currently stored ranking data.voidclearSummary()clears the current summary data.java.lang.StringcolNameWidthTipText()Returns the tip text for this property.java.lang.StringcountWidthTipText()Returns the tip text for this property.java.lang.StringenumerateColNamesTipText()Returns the tip text for this property.java.lang.StringenumerateRowNamesTipText()Returns the tip text for this property.doublegetAverage(int col)returns the average of the mean at the given position, if the position is valid, otherwise 0.intgetColCount()returns the number of columns.booleangetColHidden(int index)returns the hidden status of the column, if the index is valid, otherwise false.java.lang.StringgetColName(int index)returns the name of the row, if the index is valid, otherwise null.intgetColNameWidth()returns the current width for the column names.int[]getColOrder()returns the current order of the columns, null means the default order.doublegetCount(int index)returns the count for the row.intgetCountWidth()returns the current width for the counts.intgetDefaultColNameWidth()returns the default width for the column names.intgetDefaultCountWidth()returns the default width for the counts.booleangetDefaultEnumerateColNames()returns the default of whether column names are prefixed with the index.booleangetDefaultEnumerateRowNames()returns theh default of whether row names are prefixed with the index.intgetDefaultMeanPrec()returns the default precision for the means.intgetDefaultMeanWidth()returns the default width for the mean.booleangetDefaultPrintColNames()returns the default of whether column names or numbers instead are printed.booleangetDefaultPrintRowNames()returns the default of whether row names or numbers instead are printed.booleangetDefaultRemoveFilterName()returns the default of whether the filter classname is removed from the dataset name.intgetDefaultRowNameWidth()returns the default width for the row names.booleangetDefaultShowAverage()returns the default of whether average per column is displayed or not.booleangetDefaultShowStdDev()returns the default of whether std deviations are displayed or not.intgetDefaultSignificanceWidth()returns the default width for the significance.intgetDefaultStdDevPrec()returns the default standard deviation precision.intgetDefaultStdDevWidth()returns the default width for the std dev.intgetDisplayCol(int index)returns the displayed index of the given col, depending on the order of columns, returns -1 if index out of bounds.abstract java.lang.StringgetDisplayName()returns the name of the output format.intgetDisplayRow(int index)returns the displayed index of the given row, depending on the order of rows, returns -1 if index out of bounds.booleangetEnumerateColNames()returns whether column names are prefixed with the index.booleangetEnumerateRowNames()returns whether row names or prefixed with the index.java.lang.StringgetHeader(java.lang.String key)returns the value associated with the given key, null if if cannot be found.doublegetMean(int col, int row)returns the mean at the given position, if the position is valid, otherwise 0.intgetMeanPrec()returns the current precision for the means.intgetMeanWidth()returns the current width for the mean.java.lang.String[]getOptions()Gets the current option settings for the OptionHandler.booleangetPrintColNames()returns whether column names or numbers instead are printed.booleangetPrintRowNames()returns whether row names or numbers instead are printed.booleangetRemoveFilterName()returns whether the filter classname is removed from the dataset name.intgetRowCount()returns the number of rows.booleangetRowHidden(int index)returns the hidden status of the row, if the index is valid, otherwise false.java.lang.StringgetRowName(int index)returns the name of the row, if the index is valid, otherwise null.intgetRowNameWidth()returns the current width for the row names.int[]getRowOrder()returns the current order of the rows, null means the default order.booleangetShowAverage()returns whether average per column is displayed or not.booleangetShowStdDev()returns whether std deviations are displayed or not.intgetSignificance(int col, int row)returns the significance at the given position, if the position is valid, otherwise SIGNIFICANCE_ATIE.intgetSignificanceCount(int col, int type)counts the occurrences of the given significance type in the given column.intgetSignificanceWidth()returns the current width for the significance.doublegetStdDev(int col, int row)returns the std deviation at the given position, if the position is valid, otherwise 0.intgetStdDevPrec()returns the current standard deviation precision.intgetStdDevWidth()returns the current width for the std dev.intgetVisibleColCount()returns the number of visible columns.intgetVisibleRowCount()returns the number of visible rows.abstract java.lang.StringglobalInfo()Returns a string describing the matrix.java.util.Enumeration<java.lang.String>headerKeys()returns an enumeration of the header keys.java.util.Enumeration<Option>listOptions()Returns an enumeration of all the available options..java.lang.StringmeanPrecTipText()Returns the tip text for this property.java.lang.StringmeanWidthTipText()Returns the tip text for this property.java.lang.StringprintColNamesTipText()Returns the tip text for this property.java.lang.StringprintRowNamesTipText()Returns the tip text for this property.java.lang.StringremoveFilterNameTipText()Returns the tip text for this property.java.lang.StringrowNameWidthTipText()Returns the tip text for this property.voidsetColHidden(int index, boolean hidden)sets the hidden status of the column (if the index is valid).voidsetColName(int index, java.lang.String name)sets the name of the column (if the index is valid).voidsetColNameWidth(int width)sets the width for the column names (0 = optimal).voidsetColOrder(int[] order)sets the ordering of the columns, null means default.voidsetCount(int index, double count)sets the count for the row (if the index is valid).voidsetCountWidth(int width)sets the width for the counts (0 = optimal).voidsetEnumerateColNames(boolean enumerate)sets whether the column names are prefixed with "(x)" where "x" is the index.voidsetEnumerateRowNames(boolean enumerate)sets whether to the row names are prefixed with the index.voidsetMean(int col, int row, double value)sets the mean at the given position (if the position is valid).voidsetMeanPrec(int prec)sets the precision for the means.voidsetMeanWidth(int width)sets the width for the mean (0 = optimal).voidsetOptions(java.lang.String[] options)Sets the OptionHandler's options using the given list.voidsetPrintColNames(boolean print)sets whether the column names or numbers instead are printed.voidsetPrintRowNames(boolean print)sets whether the row names or numbers instead are printed deactivating automatically sets m_EnumerateColNames to TRUE.voidsetRanking(int[][] wins)sets the ranking data based on the wins.voidsetRemoveFilterName(boolean remove)sets whether to remove the filter classname from the dataset name.voidsetRowHidden(int index, boolean hidden)sets the hidden status of the row (if the index is valid).voidsetRowName(int index, java.lang.String name)sets the name of the row (if the index is valid).voidsetRowNameWidth(int width)sets the width for the row names (0 = optimal).voidsetRowOrder(int[] order)sets the ordering of the rows, null means default.voidsetShowAverage(boolean show)sets whether to display the average per column or not.voidsetShowStdDev(boolean show)sets whether to display the std deviations or not.voidsetSignificance(int col, int row, int value)sets the significance at the given position (if the position is valid).voidsetSignificanceWidth(int width)sets the width for the significance (0 = optimal).voidsetSize(int cols, int rows)clears the content of the matrix and sets the new size.voidsetStdDev(int col, int row, double value)sets the std deviation at the given position (if the position is valid).voidsetStdDevPrec(int prec)sets the precision for the standard deviation.voidsetStdDevWidth(int width)sets the width for the std dev (0 = optimal).voidsetSummary(int[][] nonSigWins, int[][] wins)sets the non-significant and significant wins of the resultsets.java.lang.StringshowAverageTipText()Returns the tip text for this property.java.lang.StringshowStdDevTipText()Returns the tip text for this property.java.lang.StringsignificanceWidthTipText()Returns the tip text for this property.java.lang.StringstdDevPrecTipText()Returns the tip text for this property.java.lang.StringstdDevWidthTipText()Returns the tip text for this property.java.lang.StringtoString()returns the matrix as a string.abstract java.lang.StringtoStringHeader()returns the header of the matrix as a string.abstract java.lang.StringtoStringKey()returns returns a key for all the col names, for better readability if the names got cut off.abstract java.lang.StringtoStringMatrix()returns the matrix as a string.abstract java.lang.StringtoStringRanking()returns the ranking in a string representation.abstract java.lang.StringtoStringSummary()returns the summary as string.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface weka.core.RevisionHandler
getRevision
-
-
-
-
Field Detail
-
SIGNIFICANCE_TIE
public static final int SIGNIFICANCE_TIE
tie.- See Also:
- Constant Field Values
-
SIGNIFICANCE_WIN
public static final int SIGNIFICANCE_WIN
win.- See Also:
- Constant Field Values
-
SIGNIFICANCE_LOSS
public static final int SIGNIFICANCE_LOSS
loss.- See Also:
- Constant Field Values
-
TIE_STRING
public java.lang.String TIE_STRING
tie string.
-
WIN_STRING
public java.lang.String WIN_STRING
win string.
-
LOSS_STRING
public java.lang.String LOSS_STRING
loss string.
-
LEFT_PARENTHESES
public java.lang.String LEFT_PARENTHESES
the left parentheses for enumerating cols/rows.
-
RIGHT_PARENTHESES
public java.lang.String RIGHT_PARENTHESES
the right parentheses for enumerating cols/rows.
-
-
Constructor Detail
-
ResultMatrix
public ResultMatrix()
initializes the matrix as 1x1 matrix.
-
ResultMatrix
public ResultMatrix(int cols, int rows)initializes the matrix with the given dimensions.- Parameters:
cols- the number of columnsrows- the number of rows
-
ResultMatrix
public ResultMatrix(ResultMatrix matrix)
initializes the matrix with the values from the given matrix.- Parameters:
matrix- the matrix to get the values from
-
-
Method Detail
-
globalInfo
public abstract java.lang.String globalInfo()
Returns a string describing the matrix.- Returns:
- a description suitable for displaying in the experimenter gui
-
listOptions
public java.util.Enumeration<Option> listOptions()
Returns an enumeration of all the available options..- Specified by:
listOptionsin interfaceOptionHandler- Returns:
- an enumeration of all available options.
-
setOptions
public void setOptions(java.lang.String[] options) throws java.lang.ExceptionSets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).- Specified by:
setOptionsin interfaceOptionHandler- Parameters:
options- the list of options as an array of strings- Throws:
java.lang.Exception- if an option is not supported
-
getOptions
public java.lang.String[] getOptions()
Gets the current option settings for the OptionHandler.- Specified by:
getOptionsin interfaceOptionHandler- Returns:
- the list of current option settings as an array of strings
-
getDisplayName
public abstract java.lang.String getDisplayName()
returns the name of the output format.- Returns:
- the display name
-
assign
public void assign(ResultMatrix matrix)
acquires the data from the given matrix.- Parameters:
matrix- the matrix to get the data from
-
clear
public void clear()
removes the stored data and the ordering, but retains the dimensions of the matrix.
-
setSize
public void setSize(int cols, int rows)clears the content of the matrix and sets the new size.- Parameters:
cols- the number of mean columnsrows- the number of mean rows
-
setMeanPrec
public void setMeanPrec(int prec)
sets the precision for the means.- Parameters:
prec- the number of decimals
-
getMeanPrec
public int getMeanPrec()
returns the current precision for the means.- Returns:
- the number of decimals
-
getDefaultMeanPrec
public int getDefaultMeanPrec()
returns the default precision for the means.- Returns:
- the number of decimals
-
meanPrecTipText
public java.lang.String meanPrecTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setStdDevPrec
public void setStdDevPrec(int prec)
sets the precision for the standard deviation.- Parameters:
prec- the number of decimals
-
getStdDevPrec
public int getStdDevPrec()
returns the current standard deviation precision.- Returns:
- the number of decimals
-
getDefaultStdDevPrec
public int getDefaultStdDevPrec()
returns the default standard deviation precision.- Returns:
- the number of decimals
-
stdDevPrecTipText
public java.lang.String stdDevPrecTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setColNameWidth
public void setColNameWidth(int width)
sets the width for the column names (0 = optimal).- Parameters:
width- the width
-
getColNameWidth
public int getColNameWidth()
returns the current width for the column names.- Returns:
- the width
-
getDefaultColNameWidth
public int getDefaultColNameWidth()
returns the default width for the column names.- Returns:
- the width
-
colNameWidthTipText
public java.lang.String colNameWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setRowNameWidth
public void setRowNameWidth(int width)
sets the width for the row names (0 = optimal).- Parameters:
width- the width
-
getRowNameWidth
public int getRowNameWidth()
returns the current width for the row names.- Returns:
- the width
-
getDefaultRowNameWidth
public int getDefaultRowNameWidth()
returns the default width for the row names.- Returns:
- the width
-
rowNameWidthTipText
public java.lang.String rowNameWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setMeanWidth
public void setMeanWidth(int width)
sets the width for the mean (0 = optimal).- Parameters:
width- the width
-
getMeanWidth
public int getMeanWidth()
returns the current width for the mean.- Returns:
- the width
-
getDefaultMeanWidth
public int getDefaultMeanWidth()
returns the default width for the mean.- Returns:
- the width
-
meanWidthTipText
public java.lang.String meanWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setStdDevWidth
public void setStdDevWidth(int width)
sets the width for the std dev (0 = optimal).- Parameters:
width- the width
-
getStdDevWidth
public int getStdDevWidth()
returns the current width for the std dev.- Returns:
- the width
-
getDefaultStdDevWidth
public int getDefaultStdDevWidth()
returns the default width for the std dev.- Returns:
- the width
-
stdDevWidthTipText
public java.lang.String stdDevWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setSignificanceWidth
public void setSignificanceWidth(int width)
sets the width for the significance (0 = optimal).- Parameters:
width- the width
-
getSignificanceWidth
public int getSignificanceWidth()
returns the current width for the significance.- Returns:
- the width
-
getDefaultSignificanceWidth
public int getDefaultSignificanceWidth()
returns the default width for the significance.- Returns:
- the width
-
significanceWidthTipText
public java.lang.String significanceWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setCountWidth
public void setCountWidth(int width)
sets the width for the counts (0 = optimal).- Parameters:
width- the width
-
getCountWidth
public int getCountWidth()
returns the current width for the counts.- Returns:
- the width
-
getDefaultCountWidth
public int getDefaultCountWidth()
returns the default width for the counts.- Returns:
- the width
-
countWidthTipText
public java.lang.String countWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setShowStdDev
public void setShowStdDev(boolean show)
sets whether to display the std deviations or not.- Parameters:
show- if true then the std deviations are displayed
-
getShowStdDev
public boolean getShowStdDev()
returns whether std deviations are displayed or not.- Returns:
- true if the std deviations are displayed
-
getDefaultShowStdDev
public boolean getDefaultShowStdDev()
returns the default of whether std deviations are displayed or not.- Returns:
- true if the std deviations are displayed
-
showStdDevTipText
public java.lang.String showStdDevTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setShowAverage
public void setShowAverage(boolean show)
sets whether to display the average per column or not.- Parameters:
show- if true then the average is displayed
-
getShowAverage
public boolean getShowAverage()
returns whether average per column is displayed or not.- Returns:
- true if the average is displayed
-
getDefaultShowAverage
public boolean getDefaultShowAverage()
returns the default of whether average per column is displayed or not.- Returns:
- true if the average is displayed
-
showAverageTipText
public java.lang.String showAverageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setRemoveFilterName
public void setRemoveFilterName(boolean remove)
sets whether to remove the filter classname from the dataset name.- Parameters:
remove- if true then the filter classnames are shortened
-
getRemoveFilterName
public boolean getRemoveFilterName()
returns whether the filter classname is removed from the dataset name.- Returns:
- true if the filter classnames are shortened
-
getDefaultRemoveFilterName
public boolean getDefaultRemoveFilterName()
returns the default of whether the filter classname is removed from the dataset name.- Returns:
- true if the filter classnames are shortened
-
removeFilterNameTipText
public java.lang.String removeFilterNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setPrintColNames
public void setPrintColNames(boolean print)
sets whether the column names or numbers instead are printed. deactivating automatically sets m_EnumerateColNames to TRUE.- Parameters:
print- if true then the names are printed instead of numbers- See Also:
setEnumerateColNames(boolean)
-
getPrintColNames
public boolean getPrintColNames()
returns whether column names or numbers instead are printed.- Returns:
- true if names instead of numbers are printed
-
getDefaultPrintColNames
public boolean getDefaultPrintColNames()
returns the default of whether column names or numbers instead are printed.- Returns:
- true if names instead of numbers are printed
-
printColNamesTipText
public java.lang.String printColNamesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setPrintRowNames
public void setPrintRowNames(boolean print)
sets whether the row names or numbers instead are printed deactivating automatically sets m_EnumerateColNames to TRUE.- Parameters:
print- if true then names instead of numbers are printed- See Also:
setEnumerateRowNames(boolean)
-
getPrintRowNames
public boolean getPrintRowNames()
returns whether row names or numbers instead are printed.- Returns:
- true if names instead of numbers are printed
-
getDefaultPrintRowNames
public boolean getDefaultPrintRowNames()
returns the default of whether row names or numbers instead are printed.- Returns:
- true if names instead of numbers are printed
-
printRowNamesTipText
public java.lang.String printRowNamesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setEnumerateColNames
public void setEnumerateColNames(boolean enumerate)
sets whether the column names are prefixed with "(x)" where "x" is the index.- Parameters:
enumerate- if true then the names are prefixed
-
getEnumerateColNames
public boolean getEnumerateColNames()
returns whether column names are prefixed with the index.- Returns:
- true if the names are prefixed
-
getDefaultEnumerateColNames
public boolean getDefaultEnumerateColNames()
returns the default of whether column names are prefixed with the index.- Returns:
- true if the names are prefixed
-
enumerateColNamesTipText
public java.lang.String enumerateColNamesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
setEnumerateRowNames
public void setEnumerateRowNames(boolean enumerate)
sets whether to the row names are prefixed with the index.- Parameters:
enumerate- if true then the names will be prefixed
-
getEnumerateRowNames
public boolean getEnumerateRowNames()
returns whether row names or prefixed with the index.- Returns:
- true if the names are prefixed
-
getDefaultEnumerateRowNames
public boolean getDefaultEnumerateRowNames()
returns theh default of whether row names are prefixed with the index.- Returns:
- true if the names are prefixed
-
enumerateRowNamesTipText
public java.lang.String enumerateRowNamesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the experimenter gui
-
getColCount
public int getColCount()
returns the number of columns.- Returns:
- the number of columns
-
getVisibleColCount
public int getVisibleColCount()
returns the number of visible columns.- Returns:
- the number of columns
-
getRowCount
public int getRowCount()
returns the number of rows.- Returns:
- the number of rows
-
getVisibleRowCount
public int getVisibleRowCount()
returns the number of visible rows.- Returns:
- the number of rows
-
setColName
public void setColName(int index, java.lang.String name)sets the name of the column (if the index is valid).- Parameters:
index- the index of the columnname- the name of the column
-
getColName
public java.lang.String getColName(int index)
returns the name of the row, if the index is valid, otherwise null. if getPrintColNames() is FALSE then an empty string is returned or if getEnumerateColNames() is TRUE then the 1-based index surrounded by parentheses.- Parameters:
index- the index of the column- Returns:
- the name of the column
- See Also:
setPrintColNames(boolean),getPrintColNames(),setEnumerateColNames(boolean),getEnumerateColNames()
-
setRowName
public void setRowName(int index, java.lang.String name)sets the name of the row (if the index is valid).- Parameters:
index- the index of the rowname- the name of the row
-
getRowName
public java.lang.String getRowName(int index)
returns the name of the row, if the index is valid, otherwise null. if getPrintRowNames() is FALSE then an empty string is returned or if getEnumerateRowNames() is TRUE then the 1-based index surrounded by parentheses.- Parameters:
index- the index of the row- Returns:
- the name of the row
- See Also:
setPrintRowNames(boolean),getPrintRowNames(),setEnumerateRowNames(boolean),getEnumerateRowNames()
-
setColHidden
public void setColHidden(int index, boolean hidden)sets the hidden status of the column (if the index is valid).- Parameters:
index- the index of the columnhidden- the hidden status of the column
-
getColHidden
public boolean getColHidden(int index)
returns the hidden status of the column, if the index is valid, otherwise false.- Parameters:
index- the index of the column- Returns:
- true if hidden
-
setRowHidden
public void setRowHidden(int index, boolean hidden)sets the hidden status of the row (if the index is valid).- Parameters:
index- the index of the rowhidden- the hidden status of the row
-
getRowHidden
public boolean getRowHidden(int index)
returns the hidden status of the row, if the index is valid, otherwise false.- Parameters:
index- the index of the row- Returns:
- true if hidden
-
setCount
public void setCount(int index, double count)sets the count for the row (if the index is valid).- Parameters:
index- the index of the rowcount- the count for the row
-
getCount
public double getCount(int index)
returns the count for the row. if the index is invalid then 0.- Parameters:
index- the index of the row- Returns:
- the count for the row
-
setMean
public void setMean(int col, int row, double value)sets the mean at the given position (if the position is valid).- Parameters:
col- the column of the meanrow- the row of the meanvalue- the value of the mean
-
getMean
public double getMean(int col, int row)returns the mean at the given position, if the position is valid, otherwise 0.- Parameters:
col- the column indexrow- the row index- Returns:
- the mean
-
getAverage
public double getAverage(int col)
returns the average of the mean at the given position, if the position is valid, otherwise 0.- Parameters:
col- the column index- Returns:
- the average
-
setStdDev
public void setStdDev(int col, int row, double value)sets the std deviation at the given position (if the position is valid).- Parameters:
col- the column of the std. deviationrow- the row of the std deviationvalue- the value of the std deviation
-
getStdDev
public double getStdDev(int col, int row)returns the std deviation at the given position, if the position is valid, otherwise 0.- Parameters:
col- the column indexrow- the row index- Returns:
- the std deviation
-
setSignificance
public void setSignificance(int col, int row, int value)sets the significance at the given position (if the position is valid).- Parameters:
col- the column of the significancerow- the row of the significancevalue- the value of the significance
-
getSignificance
public int getSignificance(int col, int row)returns the significance at the given position, if the position is valid, otherwise SIGNIFICANCE_ATIE.- Parameters:
col- the column indexrow- the row index- Returns:
- the indicator
-
getSignificanceCount
public int getSignificanceCount(int col, int type)counts the occurrences of the given significance type in the given column.- Parameters:
col- the columnn to gather the information fromtype- the significance type, WIN/TIE/LOSS- Returns:
- the count
-
setRowOrder
public void setRowOrder(int[] order)
sets the ordering of the rows, null means default.- Parameters:
order- the new order of the rows
-
getRowOrder
public int[] getRowOrder()
returns the current order of the rows, null means the default order.- Returns:
- the current order of the rows
-
getDisplayRow
public int getDisplayRow(int index)
returns the displayed index of the given row, depending on the order of rows, returns -1 if index out of bounds.- Parameters:
index- the row to get the displayed index for- Returns:
- the real index of the row
-
setColOrder
public void setColOrder(int[] order)
sets the ordering of the columns, null means default.- Parameters:
order- the new order of the columns
-
getColOrder
public int[] getColOrder()
returns the current order of the columns, null means the default order.- Returns:
- the current order of the columns
-
getDisplayCol
public int getDisplayCol(int index)
returns the displayed index of the given col, depending on the order of columns, returns -1 if index out of bounds.- Parameters:
index- the column to get the displayed index for- Returns:
- the real index of the column
-
toStringMatrix
public abstract java.lang.String toStringMatrix()
returns the matrix as a string.- Returns:
- the matrix as string
-
toString
public java.lang.String toString()
returns the matrix as a string.- Overrides:
toStringin classjava.lang.Object- Returns:
- the matrix as string
- See Also:
toStringMatrix()
-
clearHeader
public void clearHeader()
removes all the header information.
-
addHeader
public void addHeader(java.lang.String key, java.lang.String value)adds the key-value pair to the header.- Parameters:
key- the name of the header valuevalue- the value of the header value
-
getHeader
public java.lang.String getHeader(java.lang.String key)
returns the value associated with the given key, null if if cannot be found.- Parameters:
key- the key to retrieve the value for- Returns:
- the associated value
-
headerKeys
public java.util.Enumeration<java.lang.String> headerKeys()
returns an enumeration of the header keys.- Returns:
- all stored keys
-
toStringHeader
public abstract java.lang.String toStringHeader()
returns the header of the matrix as a string.- Returns:
- the header as string
- See Also:
m_HeaderKeys,m_HeaderValues
-
toStringKey
public abstract java.lang.String toStringKey()
returns returns a key for all the col names, for better readability if the names got cut off.- Returns:
- the key
-
clearSummary
public void clearSummary()
clears the current summary data.
-
setSummary
public void setSummary(int[][] nonSigWins, int[][] wins)sets the non-significant and significant wins of the resultsets.- Parameters:
nonSigWins- the non-significant winswins- the significant wins
-
toStringSummary
public abstract java.lang.String toStringSummary()
returns the summary as string.- Returns:
- the summary
-
clearRanking
public void clearRanking()
clears the currently stored ranking data.
-
setRanking
public void setRanking(int[][] wins)
sets the ranking data based on the wins.- Parameters:
wins- the wins
-
toStringRanking
public abstract java.lang.String toStringRanking()
returns the ranking in a string representation.- Returns:
- the ranking
-
-