Package org.jfree.data.xy
Class NormalizedMatrixSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.xy.MatrixSeries
org.jfree.data.xy.NormalizedMatrixSeries
- All Implemented Interfaces:
Serializable,Cloneable
Represents a dense normalized matrix M[i,j] where each Mij item of the
matrix has a value (default is 0). When a matrix item is observed using
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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default scale factor.Fields inherited from class org.jfree.data.xy.MatrixSeries
data -
Constructor Summary
ConstructorsConstructorDescriptionNormalizedMatrixSeries(String name, int rows, int columns) Constructor for NormalizedMatrixSeries. -
Method Summary
Modifier and TypeMethodDescriptiongetItem(int itemIndex) Returns an item.doubleReturns the factor that multiplies each item in this series when observed using getItem mehtod.voidsetScaleFactor(double factor) Sets the factor that multiplies each item in this series when observed using getItem mehtod.voidupdate(int i, int j, double mij) Updates the value of the specified item in this matrix series.voidzeroAll()Sets all matrix values to zero and sends aSeriesChangeEventto all registered listeners.Methods inherited from class org.jfree.data.xy.MatrixSeries
equals, get, getColumnsCount, getItemColumn, getItemCount, getItemRow, getRowCountMethods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, canEqual, clone, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, hashCode, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
Field Details
-
DEFAULT_SCALE_FACTOR
The default scale factor.- See Also:
-
-
Constructor Details
-
NormalizedMatrixSeries
Constructor for NormalizedMatrixSeries.- Parameters:
name- the series name.rows- the number of rows.columns- the number of columns.
-
-
Method Details
-
getItem
Returns an item.- Overrides:
getItemin classMatrixSeries- Parameters:
itemIndex- the index.- Returns:
- The value.
- See Also:
-
setScaleFactor
Sets the factor that multiplies each item in this series when observed using getItem mehtod.- Parameters:
factor- new factor to set.- See Also:
-
getScaleFactor
Returns the factor that multiplies each item in this series when observed using getItem mehtod.- Returns:
- The factor
-
update
Updates the value of the specified item in this matrix series.- Overrides:
updatein classMatrixSeries- Parameters:
i- the row of the item.j- the column of the item.mij- the new value for the item.- See Also:
-
zeroAll
Description copied from class:MatrixSeriesSets all matrix values to zero and sends aSeriesChangeEventto all registered listeners.- Overrides:
zeroAllin classMatrixSeries- See Also:
-