public class Resize extends Filter
IllegalArgumentException
will be thrown. The values of the scaled result are created by averaging.Filter.Mode
Constructor and Description |
---|
Resize(DataSource data,
int cols,
int rows)
Initializes a new data source from an original data source and a
specified number of rows and columns.
|
Modifier and Type | Method and Description |
---|---|
protected void |
filter()
Invokes the filtering routine.
|
Comparable<?> |
get(int col,
int row)
Returns the row with the specified index.
|
int |
getColumnCount()
Returns the number of columns of the data source.
|
int |
getRowCount()
Returns the number of rows of the data source.
|
add, add, clear, dataAdded, dataRemoved, dataUpdated, getColumnCountFiltered, getIndex, getIndexOriginal, getMode, getOriginal, getOriginal, getRowCountFiltered, isFiltered, set, setMode
addDataListener, getColumn, getColumnTypes, getRow, getStatistics, isColumnNumeric, iterator, notifyDataAdded, notifyDataRemoved, notifyDataUpdated, removeDataListener, setColumnTypes
public Resize(DataSource data, int cols, int rows)
data
- Original data source.cols
- Number of columns for new data source.rows
- Number of rows for new data source.public int getColumnCount()
AbstractDataSource
getColumnCount
in interface DataSource
getColumnCount
in class Filter
public int getRowCount()
Filter
getRowCount
in interface DataSource
getRowCount
in class Filter
public Comparable<?> get(int col, int row)
Filter
get
in interface DataSource
get
in class Filter
col
- index of the column to returnrow
- index of the row to returnCopyright © 2009-2013. All Rights Reserved.