public abstract class RowMajorSparseMatrix extends SparseMatrix
cardinality
Constructor and Description |
---|
RowMajorSparseMatrix(int rows,
int columns) |
RowMajorSparseMatrix(int rows,
int columns,
int cardinality) |
Modifier and Type | Method and Description |
---|---|
<T> T |
apply(MatrixMatrixOperation<T> operation,
Matrix that)
Pipes this matrix to a given
operation . |
<T> T |
apply(MatrixOperation<T> operation)
Pipes this matrix to a given
operation . |
<T> T |
apply(MatrixVectorOperation<T> operation,
Vector that)
Pipes this matrix to a given
operation . |
static RowMajorSparseMatrix |
block(Matrix a,
Matrix b,
Matrix c,
Matrix d)
|
static RowMajorSparseMatrix |
diagonal(int size,
double diagonal)
Creates a diagonal
RowMajorSparseMatrix of the given size whose
diagonal elements are equal to diagonal . |
static RowMajorSparseMatrix |
from1DArray(int rows,
int columns,
double[] array)
Creates a new
RowMajorSparseMatrix from the given 1D array with
compressing (copying) the underlying array. |
static RowMajorSparseMatrix |
from2DArray(double[][] array)
Creates a new
RowMajorSparseMatrix from the given 2D array with
compressing (copying) the underlying array. |
static RowMajorSparseMatrix |
fromCSV(String csv)
Parses
RowMajorSparseMatrix from the given CSV string. |
static RowMajorSparseMatrix |
fromMatrixMarket(String mm)
Parses
RowMajorSparseMatrix from the given Matrix Market string. |
static RowMajorSparseMatrix |
identity(int size)
Creates an identity
RowMajorSparseMatrix of the given size . |
boolean |
isRowMajor()
Checks whether or not this sparse matrix row-major.
|
abstract Iterator<Integer> |
iteratorOfNonZeroRows() |
static RowMajorSparseMatrix |
random(int rows,
int columns,
double density,
Random random)
|
static RowMajorSparseMatrix |
randomSymmetric(int size,
double density,
Random random)
Creates a random symmetric
RowMajorSparseMatrix of the given size . |
Matrix |
rotate()
Rotates this matrix by 90 degrees to the right.
|
Matrix |
transpose()
Transposes this matrix.
|
static RowMajorSparseMatrix |
zero(int rows,
int columns)
|
static RowMajorSparseMatrix |
zero(int rows,
int columns,
int capacity)
|
add, capacity, cardinality, density, eachNonZero, eachNonZeroInColumn, eachNonZeroInRow, ensureCardinalityIsCorrect, foldNonZero, foldNonZeroInColumn, foldNonZeroInColumns, foldNonZeroInRow, foldNonZeroInRows, get, getColumn, getOrElse, getRow, isColumnMajor, isZeroAt, multiply, nonZeroAt, nonZeroColumnMajorIterator, nonZeroIterator, nonZeroIteratorOfColumn, nonZeroIteratorOfRow, nonZeroRowMajorIterator, toMatrixMarket
add, blank, blankOfColumns, blankOfRows, blankOfShape, columnMajorIterator, columns, constant, copy, copyOfColumns, copyOfRows, copyOfShape, determinant, diagonalProduct, divide, each, eachInColumn, eachInRow, ensureDimensionsAreCorrect, ensureIndexesAreInBounds, equals, equals, euclideanNorm, fail, fold, foldColumn, foldColumns, foldRow, foldRows, hadamardProduct, hashCode, infinityNorm, insert, insert, insert, insert, insertColumn, insertRow, is, is, iterator, iteratorOfColumn, iteratorOfRow, kroneckerProduct, manhattanNorm, max, maxInColumn, maxInRow, min, minInColumn, minInRow, mkString, mkString, mkString, multiply, multiply, multiplyByItsTranspose, non, non, norm, power, product, random, randomSymmetric, rank, removeColumn, removeFirstColumn, removeFirstRow, removeLastColumn, removeLastRow, removeRow, rowMajorIterator, rows, select, set, setAll, setColumn, setColumn, setRow, setRow, shuffle, slice, sliceBottomRight, sliceTopLeft, subtract, subtract, sum, swapColumns, swapRows, to, toBinary, toColumnMajorSparseMatrix, toColumnVector, toCSV, toCSV, toDenseMatrix, toMatrixMarket, toRowMajorSparseMatrix, toRowVector, toSparseMatrix, toString, trace, transform, transformColumn, transformRow, unit, update, updateAt, updateColumn, updateRow, withDecompositor, withInverter, withSolver
public RowMajorSparseMatrix(int rows, int columns)
public RowMajorSparseMatrix(int rows, int columns, int cardinality)
public static RowMajorSparseMatrix zero(int rows, int columns)
public static RowMajorSparseMatrix zero(int rows, int columns, int capacity)
public static RowMajorSparseMatrix diagonal(int size, double diagonal)
RowMajorSparseMatrix
of the given size
whose
diagonal elements are equal to diagonal
.public static RowMajorSparseMatrix identity(int size)
RowMajorSparseMatrix
of the given size
.public static RowMajorSparseMatrix random(int rows, int columns, double density, Random random)
public static RowMajorSparseMatrix randomSymmetric(int size, double density, Random random)
RowMajorSparseMatrix
of the given size
.public static RowMajorSparseMatrix from1DArray(int rows, int columns, double[] array)
RowMajorSparseMatrix
from the given 1D array
with
compressing (copying) the underlying array.public static RowMajorSparseMatrix from2DArray(double[][] array)
RowMajorSparseMatrix
from the given 2D array
with
compressing (copying) the underlying array.public static RowMajorSparseMatrix block(Matrix a, Matrix b, Matrix c, Matrix d)
public static RowMajorSparseMatrix fromCSV(String csv)
RowMajorSparseMatrix
from the given CSV string.csv
- the CSV string representing a matrixpublic static RowMajorSparseMatrix fromMatrixMarket(String mm)
RowMajorSparseMatrix
from the given Matrix Market string.mm
- the string in Matrix Market formatpublic boolean isRowMajor()
SparseMatrix
isRowMajor
in class SparseMatrix
public Matrix rotate()
Matrix
public <T> T apply(MatrixOperation<T> operation)
Matrix
operation
.public <T> T apply(MatrixMatrixOperation<T> operation, Matrix that)
Matrix
operation
.public <T> T apply(MatrixVectorOperation<T> operation, Vector that)
Matrix
operation
.Copyright © 2015. All rights reserved.