public class RandomTrinaryMatrix extends AbstractMatrix
AbstractMatrix.TransposeViewVector
COL, columnLabelBindings, columns, ROW, rowLabelBindings, rows
Constructor and Description |
---|
RandomTrinaryMatrix(int rows,
int columns) |
RandomTrinaryMatrix(int seed,
int rows,
int columns,
boolean highQuality) |
Modifier and Type | Method and Description |
---|---|
Matrix |
assignColumn(int column,
Vector other)
Assign the other vector values to the column of the receiver
|
Matrix |
assignRow(int row,
Vector other)
Assign the other vector values to the row of the receiver
|
int[] |
getNumNondefaultElements()
Return the number of values in the recipient
|
double |
getQuick(int row,
int column)
Return the value at the given indexes, without checking bounds
|
Matrix |
like()
Return an empty matrix of the same underlying class as the receiver
|
Matrix |
like(int rows,
int columns)
Returns an empty matrix of the same underlying class as the receiver and of the specified
size.
|
void |
setQuick(int row,
int column,
double value)
Set the value at the given index, without checking bounds
|
Matrix |
viewPart(int[] offset,
int[] size)
Return a new matrix containing the subset of the recipient
|
aggregate, aggregateColumns, aggregateRows, asFormatString, assign, assign, assign, assign, assign, clone, columnSize, determinant, divide, get, get, getColumnLabelBindings, getFlavor, getRowLabelBindings, iterateAll, iterateNonEmpty, iterator, minus, numCols, numRows, numSlices, plus, plus, rowSize, set, set, set, set, set, set, setColumnLabelBindings, setRowLabelBindings, times, times, times, timesSquared, toString, transpose, viewColumn, viewDiagonal, viewPart, viewRow, zSum
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public RandomTrinaryMatrix(int seed, int rows, int columns, boolean highQuality)
public RandomTrinaryMatrix(int rows, int columns)
public Matrix assignColumn(int column, Vector other)
Matrix
column
- the int row to assignother
- a Vectorpublic Matrix assignRow(int row, Vector other)
Matrix
row
- the int row to assignother
- a Vectorpublic double getQuick(int row, int column)
row
- an int row indexcolumn
- an int column indexpublic Matrix like()
public Matrix like(int rows, int columns)
rows
- the int number of rowscolumns
- the int number of columnspublic void setQuick(int row, int column, double value)
row
- an int row index into the receivercolumn
- an int column index into the receivervalue
- a double value to setpublic int[] getNumNondefaultElements()
getNumNondefaultElements
in interface Matrix
getNumNondefaultElements
in class AbstractMatrix
public Matrix viewPart(int[] offset, int[] size)
viewPart
in interface Matrix
viewPart
in class AbstractMatrix
offset
- an int[2] offset into the receiversize
- the int[2] size of the desired resultCardinalityException
- if the length is greater than the cardinality of the receiverIndexException
- if the offset is negative or the offset+length is outside of the receiverCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.