Class SIMDRealDoubleMatrix
java.lang.Object
org.episteme.core.mathematics.linearalgebra.matrices.GenericMatrix<Real>
org.episteme.core.mathematics.linearalgebra.matrices.SIMDRealDoubleMatrix
- All Implemented Interfaces:
AutoCloseable, Matrix<Real>, AbelianGroup<Matrix<Real>>, AbelianMonoid<Matrix<Real>>, Group<Matrix<Real>>, Magma<Matrix<Real>>, Monoid<Matrix<Real>>, Ring<Matrix<Real>>, Semiring<Matrix<Real>>, Set<Matrix<Real>>, Module<Matrix<Real>, Real>
SIMD-accelerated Matrix implementation using JDK Vector API.
This matrix stores data in a flat double array and uses CPU vector instructions (AVX-512, NEON) for element-wise operations and matrix multiplication.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
Fields inherited from class GenericMatrix
provider, ring, storage -
Constructor Summary
ConstructorsConstructorDescriptionSIMDRealDoubleMatrix(int rows, int cols) SIMDRealDoubleMatrix(int rows, int cols, double[] data) -
Method Summary
Modifier and TypeMethodDescriptionabs()acos()acosh()Returns the sum of this matrix and another.asin()asinh()atan()atanh()cbrt()voidclose()intcols()Returns the number of columns in this matrix.booleanTests whether this set contains the specified element.cos()cosh()Returns a human-readable description of this set.Returns the determinant of this matrix.doubledoubledoubleexp()static SIMDRealDoubleMatrixget(int row, int col) Returns the element at the specified row and column.getColumn(int col) Returns the column at the specified index as a vector.double[]getRow(int row) Returns the row at the specified index as a vector.double[]getRowData(int row) Returns the ring of scalars for this module.Returns the underlying storage of this matrix.getSubMatrix(int rs, int re, int cs, int ce) Returns a submatrix of this matrix.inverse()Returns the multiplicative inverse of this matrix.log()log10()Returns the product of this matrix and another.Multiplies this matrix by a vector.negate()Returns the negation of this matrix (-this).one()Returns the multiplicative identity (one element).powScalar(double exponent) introws()Returns the number of rows in this matrix.scale(double scalar) Scalar multiplication (r × m).voidset(int row, int col, double val) voidvoidsetRowData(int row, double[] rowData) sin()sinh()sqrt()Returns the difference of this matrix and another.tan()tanh()trace()Returns the trace of this matrix (sum of diagonal elements).Returns the transpose of this matrix.zero()Returns the zero matrix of the same dimensions.Methods inherited from class GenericMatrix
cholesky, eigen, getField, getProvider, lu, qr, svd, withProviderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AbelianGroup
negate, subtractMethods inherited from interface Matrix
add, identity, inverse, isCommutative, isEmpty, isMultiplicationCommutative, map, multiply, operate, scale, toTensorMethods inherited from interface Monoid
isAssociative
-
Constructor Details
-
SIMDRealDoubleMatrix
public SIMDRealDoubleMatrix(int rows, int cols) -
SIMDRealDoubleMatrix
public SIMDRealDoubleMatrix(int rows, int cols, double[] data)
-
-
Method Details
-
from
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
rows
-
cols
-
get
-
set
public void set(int row, int col, double val) -
set
- Overrides:
setin classGenericMatrix<Real>
-
abs
-
sqrt
-
log
-
exp
-
sin
-
cos
-
tan
-
asin
-
acos
-
atan
-
sinh
-
cosh
-
tanh
-
asinh
-
acosh
-
atanh
-
cbrt
-
log10
-
powScalar
-
scale
-
doubleSum
public double doubleSum() -
doubleMin
public double doubleMin() -
doubleMax
public double doubleMax() -
add
-
multiply
-
transpose
-
subtract
-
trace
-
getSubMatrix
Description copied from interface:MatrixReturns a submatrix of this matrix.- Specified by:
getSubMatrixin interfaceMatrix<Real>- Overrides:
getSubMatrixin classGenericMatrix<Real>
-
getInternalData
public double[] getInternalData() -
getRowData
public double[] getRowData(int row) -
setRowData
public void setRowData(int row, double[] rowData) -
getRow
-
getColumn
-
determinant
Description copied from interface:MatrixReturns the determinant of this matrix.- Specified by:
determinantin interfaceMatrix<Real>- Overrides:
determinantin classGenericMatrix<Real>
-
inverse
-
multiply
-
negate
-
zero
-
one
Description copied from interface:SemiringReturns the multiplicative identity (one element).Satisfies: 1 × a = a × 1 = a for all elements a.
-
getStorage
Description copied from interface:MatrixReturns the underlying storage of this matrix.- Specified by:
getStoragein interfaceMatrix<Real>- Overrides:
getStoragein classGenericMatrix<Real>- Returns:
- the matrix storage
-
getScalarRing
Description copied from interface:ModuleReturns the ring of scalars for this module.- Specified by:
getScalarRingin interfaceMatrix<Real>- Specified by:
getScalarRingin interfaceModule<Matrix<Real>, Real>- Overrides:
getScalarRingin classGenericMatrix<Real>- Returns:
- the scalar ring
-
scale
Description copied from interface:ModuleScalar multiplication (r × m). -
contains
Description copied from interface:SetTests whether this set contains the specified element.This is the fundamental operation of a set - membership testing.
-
description
Description copied from interface:SetReturns a human-readable description of this set.Examples:
- "â„ (Real Numbers)"
- "ℤ/12ℤ (Integers modulo 12)"
- "{1, 2, 3, 4, 5}"
- Specified by:
descriptionin interfaceSet<Matrix<Real>>- Overrides:
descriptionin classGenericMatrix<Real>- Returns:
- a description of this set
-