public class NormalizedMatrixSeries extends MatrixSeries
getItem
method, it is normalized, that is, divided by the
total sum of all items. It can be also be scaled by setting a scale factor.Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SCALE_FACTOR
The default scale factor.
|
data
Constructor and Description |
---|
NormalizedMatrixSeries(java.lang.String name,
int rows,
int columns)
Constructor for NormalizedMatrixSeries.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Number |
getItem(int itemIndex)
Returns an item.
|
double |
getScaleFactor()
Returns the factor that multiplies each item in this series when
observed using getItem mehtod.
|
void |
setScaleFactor(double factor)
Sets the factor that multiplies each item in this series when observed
using getItem mehtod.
|
void |
update(int i,
int j,
double mij)
Updates the value of the specified item in this matrix series.
|
void |
zeroAll()
Sets all matrix values to zero and sends a
SeriesChangeEvent to all registered
listeners. |
equals, get, getColumnsCount, getItemColumn, getItemCount, getItemRow, getRowCount
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, clone, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, hashCode, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
public static final double DEFAULT_SCALE_FACTOR
public NormalizedMatrixSeries(java.lang.String name, int rows, int columns)
name
- the series name.rows
- the number of rows.columns
- the number of columns.public java.lang.Number getItem(int itemIndex)
getItem
in class MatrixSeries
itemIndex
- the index.MatrixSeries.getItem(int)
public void setScaleFactor(double factor)
factor
- new factor to set.DEFAULT_SCALE_FACTOR
public double getScaleFactor()
public void update(int i, int j, double mij)
update
in class MatrixSeries
i
- the row of the item.j
- the column of the item.mij
- the new value for the item.MatrixSeries.get(int, int)
public void zeroAll()
MatrixSeries
SeriesChangeEvent
to all registered
listeners.zeroAll
in class MatrixSeries
MatrixSeries.zeroAll()