public class TransposeView extends GenericMatrix
NB2
Constructor and Description |
---|
TransposeView(Matrix base) |
Modifier and Type | Method and Description |
---|---|
void |
changeSize(int newRows,
int newCols)
This method alters the size of a matrix, either adding or subtracting
rows from the internal structure of the matrix.
|
int |
cols()
Returns the number of columns stored in this matrix
|
double |
get(int i,
int j)
Returns the value stored at at the matrix position Ai,j
|
Vec |
getColumnView(int j)
Obtains a vector that is backed by this, at very little memory
cost.
|
protected Matrix |
getMatrixOfSameType(int rows,
int cols)
Creates a new matrix of the same type
|
Vec |
getRowView(int r)
Obtains a vector that is backed by this, at very little memory
cost.
|
boolean |
isSparce()
Returns
true if the matrix is sparse, false otherwise |
int |
rows()
Returns the number of rows stored in this matrix
|
void |
set(int i,
int j,
double value)
Sets the value stored at at the matrix position Ai,j
|
clone, lup, lup, multiply, multiply, multiply, multiplyTranspose, multiplyTranspose, mutableAdd, mutableAdd, mutableAdd, mutableAdd, mutableMultiply, mutableMultiply, mutableTranspose, qr, qr, swapRows, transpose, transposeMultiply, transposeMultiply, transposeMultiply, zeroOut
add, add, add, add, canBeMutated, canMultiply, copyTo, diag, diagMult, diagMult, equals, equals, eye, getColumn, getRow, increment, isSquare, isSymmetric, isSymmetric, multiply, multiply, multiply, multiply, multiply, multiplyTranspose, multiplyTranspose, mutableAdd, mutableAdd, mutableSubtract, mutableSubtract, mutableSubtract, mutableSubtract, mutableSubtract, mutableSubtract, nnz, OuterProductUpdate, OuterProductUpdate, pascal, random, sameDimensions, subtract, subtract, subtract, subtract, toString, transpose, transposeMultiply, transposeMultiply, transposeMultiply, updateRow
public TransposeView(Matrix base)
public Vec getColumnView(int j)
Matrix
getColumnView
in class Matrix
j
- the column to obtain a view ofpublic Vec getRowView(int r)
Matrix
getRowView
in class Matrix
r
- the row to obtain a view ofprotected Matrix getMatrixOfSameType(int rows, int cols)
GenericMatrix
getMatrixOfSameType
in class GenericMatrix
rows
- the number of rows for the matrix to havecols
- the number of columns for the matrix to havepublic double get(int i, int j)
Matrix
public void set(int i, int j, double value)
Matrix
public int rows()
Matrix
public int cols()
Matrix
public boolean isSparce()
Matrix
true
if the matrix is sparse, false
otherwisepublic void changeSize(int newRows, int newCols)
Matrix
changeSize
in class Matrix
newRows
- the new number of rows, must be positivenewCols
- the new number of columns, must be positive.Copyright © 2017. All rights reserved.