public final class Matrices extends Object
Modifier and Type | Field and Description |
---|---|
static MatrixFactory<Basic1DMatrix> |
BASIC_1D
A matrix factory that produces zero
Basic1DMatrix . |
static MatrixFactory<Basic2DMatrix> |
BASIC_2D
A matrix factory that produces zero
Basic2DMatrix . |
static MatrixFactory<CCSMatrix> |
CCS
A matrix factory that produces zero
CCSMatrix . |
static MatrixFactory<?>[] |
CONVERTERS |
static MatrixFactory<CRSMatrix> |
CRS
A matrix factory that produces zero
CRSMatrix . |
static MatrixFunction |
DEC_FUNCTION
Decreases each element of matrix by
1 . |
static MatrixFactory<Basic2DMatrix> |
DENSE
A default matrix factory for dense matrices.
|
static MatrixPredicate |
DIAGONAL_MATRIX
Checks whether the matrix is a
diagonal
matrix.
|
static AdvancedMatrixPredicate |
DIAGONALLY_DOMINANT_MATRIX
Checks whether the matrix is a
diagonally dominant matrix.
|
static double |
EPS
The machine epsilon, that is calculated at runtime.
|
static MatrixPredicate |
IDENTITY_MATRIX
Checks whether the matrix is an
identity
matrix.
|
static MatrixFunction |
INC_FUNCTION
Increases each element of matrix by
1 . |
static MatrixFunction |
INV_FUNCTION
Inverts each element of matrix.
|
static MatrixPredicate |
LOWER_BIDIAGONAL_MATRIX
Checks whether the matrix is a lower bi-diagonal matrix.
|
static MatrixPredicate |
LOWER_TRIANGULAR_MATRIX
Checks whether the matrix is a
lower
triangular matrix.
|
static MatrixPredicate |
NEGATIVE_MATRIX
Checks whether the matrix is a
negative
matrix.
|
static AdvancedMatrixPredicate |
POSITIVE_DEFINITE_MATRIX
Checks whether the matrix is positive definite.
|
static MatrixPredicate |
POSITIVE_MATRIX
Checks whether the matrix is a
positive
matrix.
|
static int |
ROUND_FACTOR
Exponent of machine epsilon
|
static MatrixFactory<CRSMatrix> |
SPARSE
A default factory for sparse matrices.
|
static MatrixFactory<CCSMatrix> |
SPARSE_COLUMN_MAJOR
A default factory for sparse column-major matrices.
|
static MatrixFactory<CRSMatrix> |
SPARSE_ROW_MAJOR
A default factory for sparse row-major matrices.
|
static AdvancedMatrixPredicate |
SYMMETRIC_MATRIX
Checks whether the matrix is a
symmetric
matrix.
|
static MatrixPredicate |
TRIDIAGONAL_MATRIX
Checks whether the matrix is a
tridiagonal
matrix.
|
static MatrixPredicate |
UPPER_BIDIAGONAL_MATRIX
Checks whether the matrix is an upper bidiagonal matrix.
|
static MatrixPredicate |
UPPER_TRIANGULAR_MATRIX
Checks whether the matrix is an
upper
triangular matrix.
|
static MatrixPredicate |
ZERO_MATRIX
Checks whether the matrix is a
zero
matrix.
|
Constructor and Description |
---|
Matrices() |
Modifier and Type | Method and Description |
---|---|
static MatrixProcedure |
asAccumulatorProcedure(MatrixAccumulator accumulator)
Creates an accumulator procedure that adapts a matrix accumulator for procedure
interface.
|
static MatrixFunction |
asConstFunction(double arg)
Creates a const function that evaluates it's argument to given
value . |
static MatrixFunction |
asDivFunction(double arg)
Creates a div function that divides it's argument by given
value . |
static MatrixFunction |
asMinusFunction(double arg)
Creates a minus function that subtracts given
value from it's argument. |
static MatrixFunction |
asModFunction(double arg)
Creates a mod function that calculates the modulus of it's argument and given
value . |
static MatrixFunction |
asMulFunction(double arg)
Creates a mul function that multiplies given
value by it's argument. |
static MatrixFunction |
asPlusFunction(double arg)
Creates a plus function that adds given
value to it's argument. |
static MatrixAccumulator |
asProductAccumulator(double neutral)
Creates a product matrix accumulator that calculates the product of all elements in the matrix.
|
static MatrixAccumulator |
asProductFunctionAccumulator(double neutral,
MatrixFunction function)
Creates a product function accumulator, that calculates the product of
all elements in the matrix after applying given
function to
each of them. |
static MatrixAccumulator |
asSumAccumulator(double neutral)
Creates a sum matrix accumulator that calculates the sum of all elements in the matrix.
|
static MatrixAccumulator |
asSumFunctionAccumulator(double neutral,
MatrixFunction function)
Creates a sum function accumulator, that calculates the sum of all
elements in the matrix after applying given
function to each of them. |
static MatrixAccumulator |
mkEuclideanNormAccumulator()
Makes an Euclidean norm accumulator that allows to use
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation. |
static MatrixAccumulator |
mkInfinityNormAccumulator()
Makes an Infinity norm accumulator that allows to use
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation. |
static MatrixAccumulator |
mkManhattanNormAccumulator()
Makes an Manhattan norm accumulator that allows to use
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation. |
static MatrixAccumulator |
mkMaxAccumulator()
Makes a maximum matrix accumulator that accumulates the maximum of matrix elements.
|
static MatrixAccumulator |
mkMinAccumulator()
Makes a minimum matrix accumulator that accumulates the minimum of matrix elements.
|
public static final double EPS
public static final int ROUND_FACTOR
public static final MatrixPredicate DIAGONAL_MATRIX
public static final MatrixPredicate IDENTITY_MATRIX
public static final MatrixPredicate ZERO_MATRIX
public static final MatrixPredicate TRIDIAGONAL_MATRIX
public static final MatrixPredicate POSITIVE_MATRIX
public static final MatrixPredicate NEGATIVE_MATRIX
public static final MatrixPredicate LOWER_BIDIAGONAL_MATRIX
public static final MatrixPredicate UPPER_BIDIAGONAL_MATRIX
public static final MatrixPredicate LOWER_TRIANGULAR_MATRIX
public static final MatrixPredicate UPPER_TRIANGULAR_MATRIX
public static final AdvancedMatrixPredicate SYMMETRIC_MATRIX
public static final AdvancedMatrixPredicate DIAGONALLY_DOMINANT_MATRIX
public static final AdvancedMatrixPredicate POSITIVE_DEFINITE_MATRIX
public static final MatrixFactory<Basic2DMatrix> BASIC_2D
Basic2DMatrix
.public static final MatrixFactory<Basic1DMatrix> BASIC_1D
Basic1DMatrix
.public static final MatrixFactory<Basic2DMatrix> DENSE
public static final MatrixFactory<CCSMatrix> CCS
CCSMatrix
.public static final MatrixFactory<CRSMatrix> CRS
CRSMatrix
.public static final MatrixFactory<CRSMatrix> SPARSE
public static final MatrixFactory<CRSMatrix> SPARSE_ROW_MAJOR
public static final MatrixFactory<CCSMatrix> SPARSE_COLUMN_MAJOR
public static final MatrixFactory<?>[] CONVERTERS
public static final MatrixFunction INC_FUNCTION
1
.public static final MatrixFunction DEC_FUNCTION
1
.public static final MatrixFunction INV_FUNCTION
public static MatrixFunction asConstFunction(double arg)
value
.arg
- a const value_
public static MatrixFunction asPlusFunction(double arg)
value
to it's argument.arg
- a value to be added to function's argument_ + _
public static MatrixFunction asMinusFunction(double arg)
value
from it's argument.arg
- a value to be subtracted from function's argument_ - _
public static MatrixFunction asMulFunction(double arg)
value
by it's argument.arg
- a value to be multiplied by function's argument_ * _
public static MatrixFunction asDivFunction(double arg)
value
.arg
- a divisor value_ / _
public static MatrixFunction asModFunction(double arg)
value
.arg
- a divisor value_ % _
public static MatrixAccumulator mkMinAccumulator()
public static MatrixAccumulator mkMaxAccumulator()
public static MatrixAccumulator mkEuclideanNormAccumulator()
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation.public static MatrixAccumulator mkManhattanNormAccumulator()
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation.public static MatrixAccumulator mkInfinityNormAccumulator()
org.la4j.Matrix#fold(org.la4j.vector.functor.MatrixAccumulator)
method for norm calculation.public static MatrixAccumulator asSumAccumulator(double neutral)
neutral
- the neutral valuepublic static MatrixAccumulator asProductAccumulator(double neutral)
neutral
- the neutral valuepublic static MatrixAccumulator asSumFunctionAccumulator(double neutral, MatrixFunction function)
function
to each of them.neutral
- the neutral valuefunction
- the matrix functionpublic static MatrixAccumulator asProductFunctionAccumulator(double neutral, MatrixFunction function)
function
to
each of them.neutral
- the neutral valuefunction
- the matrix functionpublic static MatrixProcedure asAccumulatorProcedure(MatrixAccumulator accumulator)
accumulator
- the matrix accumulatorCopyright © 2015. All rights reserved.