org.jfree.data.xy
Class MatrixSeries
- Cloneable, Serializable
Represents a dense matrix M[i,j] where each Mij item of the matrix has a
value (default is 0).
protected double[][] | data - Series matrix values
|
MatrixSeries(String name, int rows, int columns) - Constructs a new matrix series.
|
boolean | equals(Object obj) - Tests this object instance for equality with an arbitrary object.
|
double | get(int i, int j) - Returns the value of the specified item in this matrix series.
|
int | getColumnsCount() - Returns the number of columns in this matrix series.
|
Number | getItem(int itemIndex) - Return the matrix item at the specified index.
|
int | getItemColumn(int itemIndex) - Returns the column of the specified item.
|
int | getItemCount() - Returns the number of items in the series.
|
int | getItemRow(int itemIndex) - Returns the row of the specified item.
|
int | getRowCount() - Returns the number of rows in this matrix series.
|
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.
|
addChangeListener , addPropertyChangeListener , clone , equals , firePropertyChange , fireSeriesChanged , getDescription , getItemCount , getKey , getNotify , hashCode , isEmpty , notifyListeners , removeChangeListener , removePropertyChangeListener , setDescription , setKey , setNotify |
data
protected double[][] data
Series matrix values
MatrixSeries
public MatrixSeries(String name,
int rows,
int columns)
Constructs a new matrix series.
By default, all matrix items are initialzed to 0.
name
- series name (null
not permitted).rows
- the number of rows.columns
- the number of columns.
equals
public boolean equals(Object obj)
Tests this object instance for equality with an arbitrary object.
- equals in interface Series
obj
- the object (null
permitted).
get
public double get(int i,
int j)
Returns the value of the specified item in this matrix series.
i
- the row of the item.j
- the column of the item.
- The value of the specified item in this matrix series.
getColumnsCount
public int getColumnsCount()
Returns the number of columns in this matrix series.
- The number of columns in this matrix series.
getItem
public Number getItem(int itemIndex)
Return the matrix item at the specified index. Note that this method
creates a new Double
instance every time it is called.
- The matrix item at the specified index.
getItemColumn
public int getItemColumn(int itemIndex)
Returns the column of the specified item.
itemIndex
- the index of the item.
- The column of the specified item.
getItemRow
public int getItemRow(int itemIndex)
Returns the row of the specified item.
itemIndex
- the index of the item.
- The row of the specified item.
getRowCount
public int getRowCount()
Returns the number of rows in this matrix series.
- The number of rows in this matrix series.
update
public void update(int i,
int j,
double mij)
Updates the value of the specified item in this matrix series.
i
- the row of the item.j
- the column of the item.mij
- the new value for the item.