public class

MatrixSeries

extends Series
implements Serializable
java.lang.Object
   ↳ org.jfree.data.general.Series
     ↳ org.jfree.data.xy.MatrixSeries
Known Direct Subclasses

Class Overview

Represents a dense matrix M[i,j] where each Mij item of the matrix has a value (default is 0).

Summary

Fields
protected double[][] data Series matrix values
Public Constructors
MatrixSeries(String name, int rows, int columns)
Constructs a new matrix series.
Public Methods
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.
[Expand]
Inherited Methods
From class org.jfree.data.general.Series
From class java.lang.Object

Fields

protected double[][] data

Series matrix values

Public Constructors

public MatrixSeries (String name, int rows, int columns)

Constructs a new matrix series.

By default, all matrix items are initialzed to 0.

Parameters
name series name (null not permitted).
rows the number of rows.
columns the number of columns.

Public Methods

public boolean equals (Object obj)

Tests this object instance for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public double get (int i, int j)

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.

public int getColumnsCount ()

Returns the number of columns in this matrix series.

Returns
  • The number of columns in this matrix series.

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.

Parameters
itemIndex item index.
Returns
  • The matrix item at the specified index.
See Also

public int getItemColumn (int itemIndex)

Returns the column of the specified item.

Parameters
itemIndex the index of the item.
Returns
  • The column of the specified item.

public int getItemCount ()

Returns the number of items in the series.

Returns
  • The item count.

public int getItemRow (int itemIndex)

Returns the row of the specified item.

Parameters
itemIndex the index of the item.
Returns
  • The row of the specified item.

public int getRowCount ()

Returns the number of rows in this matrix series.

Returns
  • The number of rows in this matrix series.

public void update (int i, int j, double mij)

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

public void zeroAll ()

Sets all matrix values to zero and sends a SeriesChangeEvent to all registered listeners.