Package adams.data.spreadsheet.rowscore
Class ColumnSubset
-
- All Implemented Interfaces:
Destroyable,ErrorProvider,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
public class ColumnSubset extends AbstractMetaRowScore
Applies the specified base row score algorithm to the specified subset of columns and returns the calculated score.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-row-score <adams.data.spreadsheet.rowscore.AbstractRowScore> (property: rowScore) The row score algorithm to apply to the column subset. default: adams.data.spreadsheet.rowscore.ArrayStatistic -statistic adams.data.statistics.ArrayMean
-columns <adams.data.spreadsheet.SpreadSheetColumnRange> (property: columns) The range of columns to apply the specified row score algorithm to. default: first-last example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnRangem_Columnsthe subset of columns to use.-
Fields inherited from class adams.data.spreadsheet.rowscore.AbstractMetaRowScore
m_RowScore
-
Fields inherited from class adams.data.spreadsheet.rowscore.AbstractRowScore
m_LastError
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ColumnSubset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolumnsTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected Double[]doCalculateScore(SpreadSheet sheet, int rowIndex)Performs the actual calculation of the row score.SpreadSheetColumnRangegetColumns()Returns the range of columns to apply the row score algorithm to.StringglobalInfo()Returns a string describing the object.StringrowScoreTipText()Returns the tip text for this property.voidsetColumns(SpreadSheetColumnRange value)Sets the range of columns to apply the row score algorithm to.-
Methods inherited from class adams.data.spreadsheet.rowscore.AbstractMetaRowScore
getDefaultRowScore, getNumScores, getRowScore, setRowScore
-
Methods inherited from class adams.data.spreadsheet.rowscore.AbstractRowScore
calculateScore, check, getLastError, hasLastError
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Columns
protected SpreadSheetColumnRange m_Columns
the subset of columns to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractMetaRowScore
-
rowScoreTipText
public String rowScoreTipText()
Returns the tip text for this property.- Specified by:
rowScoreTipTextin classAbstractMetaRowScore- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumns
public void setColumns(SpreadSheetColumnRange value)
Sets the range of columns to apply the row score algorithm to.- Parameters:
value- the range
-
getColumns
public SpreadSheetColumnRange getColumns()
Returns the range of columns to apply the row score algorithm to.- Returns:
- the range
-
columnsTipText
public String columnsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doCalculateScore
protected Double[] doCalculateScore(SpreadSheet sheet, int rowIndex)
Performs the actual calculation of the row score.- Specified by:
doCalculateScorein classAbstractRowScore- Parameters:
sheet- the spreadsheet to generate the score forrowIndex- the row index- Returns:
- the generated score, null in case of an error
-
-