public class TransposedArrayMatrixAxes extends ArrayMatrixAxes
Axes
to use with transposed array matrixes of any number type (the type
of the arrays is inferred by using the reflection api). An array matrix is just a two dimensional
rectangular array (new double[20][3]
). The first index of the transposed matrix
gives the column, the second the row (3 rows and 20 columns).
If your array matrix is not transposed (your first index denotes the row, the second one the
column), just use ArrayMatrixAxes
.
Axes
Additional, ThreeD, TwoD
Constructor and Description |
---|
TransposedArrayMatrixAxes(Object matrix)
Create a new
Axes object containing the given array matrix without labels /
styles. |
TransposedArrayMatrixAxes(Object matrix,
String[] labels,
String[] styles)
Create a new
Axes object containing the given array matrix with the given labels
/styles (either can be null ). |
Modifier and Type | Method and Description |
---|---|
Number |
getNumber(int row,
int col)
Gets the entry of this axes at the specified position.
|
int |
getNumColumns()
Gets the number of columns.
|
int |
getNumRows()
Gets the number of rows.
|
Iterator<String> |
iterator()
Yields the tab separated columns row by row.
|
addAxes, applyDefaultStyle, getDimensionType, getLabel, getStyle, getX, setLabel, setStyle
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public TransposedArrayMatrixAxes(Object matrix)
Axes
object containing the given array matrix without labels /
styles. If the passed object is not a valid array matrix, an IllegalArgumentException
will be thrown.matrix
- array matrixpublic TransposedArrayMatrixAxes(Object matrix, String[] labels, String[] styles)
Axes
object containing the given array matrix with the given labels
/styles (either can be null
). If the passed object is not a valid array matrix, an
IllegalArgumentException
will be thrown.matrix
- the array matrixlabels
- the labelsstyles
- the stylespublic Number getNumber(int row, int col)
Axes
public int getNumRows()
Axes
getNumRows
in class ArrayMatrixAxes
public int getNumColumns()
Axes
Axes
object is also
included.getNumColumns
in class ArrayMatrixAxes
Copyright © 2007–2021. All rights reserved.