Package org.jfree.data.xy
Class MatrixSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.xy.MatrixSeries
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
NormalizedMatrixSeries
Represents a dense matrix M[i,j] where each Mij item of the matrix has a
value (default is 0).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMatrixSeries(String name, int rows, int columns) Constructs a new matrix series. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests this object instance for equality with an arbitrary object.doubleget(int i, int j) Returns the value of the specified item in this matrix series.intReturns the number of columns in this matrix series.getItem(int itemIndex) Return the matrix item at the specified index.intgetItemColumn(int itemIndex) Returns the column of the specified item.intReturns the number of items in the series.intgetItemRow(int itemIndex) Returns the row of the specified item.intReturns the number of rows in this matrix series.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.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, canEqual, clone, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, hashCode, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
Field Details
-
data
Series matrix values
-
-
Constructor Details
-
MatrixSeries
Constructs a new matrix series.By default, all matrix items are initialzed to 0.
- Parameters:
name- series name (nullnot permitted).rows- the number of rows.columns- the number of columns.
-
-
Method Details
-
getColumnsCount
Returns the number of columns in this matrix series.- Returns:
- The number of columns in this matrix series.
-
getItem
Return the matrix item at the specified index. Note that this method creates a newdoubleinstance every time it is called.- Parameters:
itemIndex- item index.- Returns:
- The matrix item at the specified index.
- See Also:
-
getItemColumn
Returns the column of the specified item.- Parameters:
itemIndex- the index of the item.- Returns:
- The column of the specified item.
-
getItemCount
Returns the number of items in the series.- Specified by:
getItemCountin classSeries- Returns:
- The item count.
-
getItemRow
Returns the row of the specified item.- Parameters:
itemIndex- the index of the item.- Returns:
- The row of the specified item.
-
getRowCount
Returns the number of rows in this matrix series.- Returns:
- The number of rows in this matrix series.
-
get
Returns the value of the specified item in this matrix series.- Parameters:
i- the row of the item.j- the column of the item.- Returns:
- The value of the specified item in this matrix series.
- See Also:
-
update
Updates the value of the specified item in this matrix series.- Parameters:
i- the row of the item.j- the column of the item.mij- the new value for the item.- See Also:
-
zeroAll
Sets all matrix values to zero and sends aSeriesChangeEventto all registered listeners. -
equals
Tests this object instance for equality with an arbitrary object.
-