Uses of Interface
org.flag4j.algebraic_structures.Semiring
Packages that use Semiring
Package
Description
Provides algebraic structures such as semirings, rings, and fields,
along with their concrete implementations.
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
Utilities, configurations, and management for multithreaded implementations.
-
Uses of Semiring in org.flag4j.algebraic_structures
Classes in org.flag4j.algebraic_structures with type parameters of type SemiringModifier and TypeInterfaceDescriptioninterface
Defines a mathematical semiring structure and specifies the operations that semiring elements must support.Subinterfaces of Semiring in org.flag4j.algebraic_structuresModifier and TypeInterfaceDescriptioninterface
Defines a mathematical field structure and specifies the operations that field elements must support.interface
Defines a mathematical ring structure and specifies the operations that ring elements must support.Classes in org.flag4j.algebraic_structures that implement SemiringModifier and TypeClassDescriptionclass
Represents an immutable boolean value within a semiring structure.class
Represents an immutable complex number with double-precision floating point components.class
Represents an immutable complex number with single-precision floating point components.class
Represents an immutable real number backed by a 32-bit floating-point value.class
Represents an immutable real number backed by a 64-bit floating-point value.class
A real number backed by a 16-bit integer number.class
A real number backed by a 32-bit integer number. -
Uses of Semiring in org.flag4j.arrays
Constructors in org.flag4j.arrays with parameters of type SemiringModifierConstructorDescriptionSmartMatrix
(T[][] matrix) Constructs aSmartMatrix
from a 2DSemiringMatrix
array. -
Uses of Semiring in org.flag4j.arrays.backend.semiring_arrays
Classes in org.flag4j.arrays.backend.semiring_arrays with type parameters of type SemiringModifier and TypeClassDescriptionclass
AbstractCooSemiringMatrix<T extends AbstractCooSemiringMatrix<T,
U, V, W>, U extends AbstractDenseSemiringMatrix<U, ?, W>, V extends AbstractCooSemiringVector<V, ?, T, U, W>, W extends Semiring<W>> A sparse matrix stored in coordinate list (COO) format.class
AbstractCooSemiringTensor<T extends AbstractCooSemiringTensor<T,
U, V>, U extends AbstractDenseSemiringTensor<U, V>, V extends Semiring<V>> Base class for all sparse tensors stored in coordinate list (COO) format.class
AbstractCooSemiringVector<T extends AbstractCooSemiringVector<T,
U, V, W, Y>, U extends AbstractDenseSemiringVector<U, W, Y>, V extends AbstractCooSemiringMatrix<V, W, T, Y>, W extends AbstractDenseSemiringMatrix<W, U, Y>, Y extends Semiring<Y>> A sparse vector stored in coordinate list (COO) format.class
AbstractCsrSemiringMatrix<T extends AbstractCsrSemiringMatrix<T,
U, V, W>, U extends AbstractDenseSemiringMatrix<U, ?, W>, V extends AbstractCooSemiringVector<V, ?, ?, U, W>, W extends Semiring<W>> A sparse matrix stored in compressed sparse row (CSR) format.class
AbstractDenseSemiringMatrix<T extends AbstractDenseSemiringMatrix<T,
U, V>, U extends AbstractDenseSemiringVector<U, T, V>, V extends Semiring<V>> The base class for all dense matrices whose elements are members of aSemiring
.class
AbstractDenseSemiringTensor<T extends AbstractDenseSemiringTensor<T,
V>, V extends Semiring<V>> The base class for all denseSemiring
tensors.class
AbstractDenseSemiringVector<T extends AbstractDenseSemiringVector<T,
U, V>, U extends AbstractDenseSemiringMatrix<U, T, V>, V extends Semiring<V>> The base class for all dense vectors whose data areSemiring
elements.interface
SemiringTensorMixin<T extends SemiringTensorMixin<T,
U, V>, U extends SemiringTensorMixin<U, U, V>, V extends Semiring<V>> This interface provides default functionality for all tensors whose data are elements of aSemiring
.Fields in org.flag4j.arrays.backend.semiring_arrays declared as SemiringModifier and TypeFieldDescriptionprotected W
AbstractCooSemiringMatrix.zeroElement
The zero element for the semiring that this tensor's elements belong to.protected V
AbstractCooSemiringTensor.zeroElement
The zero element for the semiring that this tensor's elements belong to.protected W
AbstractCsrSemiringMatrix.zeroElement
The zero element for the semiring that this tensor's elements belong to.protected V
AbstractDenseSemiringTensor.zeroElement
The zero element for the semiring that this tensor's elements belong to.Methods in org.flag4j.arrays.backend.semiring_arrays that return SemiringModifier and TypeMethodDescriptiondefault V[]
SemiringTensorMixin.makeEmptyDataArray
(int length) Creates an empty array of the same type as the data array of this tensor.Methods in org.flag4j.arrays.backend.semiring_arrays with parameters of type SemiringModifier and TypeMethodDescriptionabstract AbstractCooSemiringMatrix
<?, U, V, W> AbstractCsrSemiringMatrix.makeLikeCooMatrix
(Shape shape, W[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.protected abstract AbstractCooSemiringMatrix
<?, T, ?, V> AbstractDenseSemiringMatrix.makeLikeCooMatrix
(Shape shape, V[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix which is of a similar type as this dense matrix.protected abstract AbstractTensor
<?, V[], V> AbstractDenseSemiringTensor.makeLikeCooTensor
(Shape shape, V[] data, int[][] indices) Constructs a sparse COO tensor which is of a similar type as this dense tensor.abstract AbstractCsrSemiringMatrix
<?, U, V, W> AbstractCooSemiringMatrix.makeLikeCsrMatrix
(Shape shape, W[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.abstract AbstractCsrSemiringMatrix
<?, T, ?, V> AbstractDenseSemiringMatrix.makeLikeCsrMatrix
(Shape shape, V[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix which is of a similar type as this dense matrix.abstract W
AbstractCooSemiringVector.makeLikeDenseMatrix
(Shape shape, Y... entries) Constructs a dense matrix of a similar type as this vector with the specified shape and data.abstract U
AbstractCooSemiringMatrix.makeLikeDenseTensor
(Shape shape, W[] entries) Constructs a dense tensor with the specifiedshape
anddata
which is a similar type to this sparse tensor.abstract U
AbstractCooSemiringTensor.makeLikeDenseTensor
(Shape shape, V[] entries) Constructs a dense tensor that is a similar type as this sparse COO tensor.abstract U
AbstractCooSemiringVector.makeLikeDenseTensor
(Shape shape, Y... entries) Constructs a dense vector of a similar type as this vector with the specified shape and data.abstract U
AbstractCsrSemiringMatrix.makeLikeDenseTensor
(Shape shape, W[] entries) Constructs a dense matrix which is of a similar type to this sparse CSR matrix.abstract V
AbstractCooSemiringVector.makeLikeMatrix
(Shape shape, Y[] entries, int[] rowIndices, int[] colIndices) Constructs a COO matrix with the specified shape, non-zero data, and row and column indices.protected abstract U
AbstractDenseSemiringVector.makeLikeMatrix
(Shape shape, V[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.abstract T
AbstractCooSemiringMatrix.makeLikeTensor
(Shape shape, W[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO tensor of the same type as this tensor with the specified non-zero data and indices.abstract T
AbstractCooSemiringTensor.makeLikeTensor
(Shape shape, V[] data, int[][] indices) Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.abstract T
AbstractCooSemiringVector.makeLikeTensor
(Shape shape, Y[] entries, int[] indices) Constructs a sparse COO vector of the same type as this vector with the specified non-zero data and indices.abstract T
AbstractCsrSemiringMatrix.makeLikeTensor
(Shape shape, W[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR tensor of the same type as this tensor with the specified non-zero data and indices.abstract T
AbstractDenseSemiringVector.makeLikeTensor
(V[] entries) Constructs a dense vector with the specifieddata
of the same type as the vector.abstract V
AbstractCooSemiringMatrix.makeLikeVector
(Shape shape, W[] entries, int[] indices) Constructs a sparse COO vector of a similar type to this COO matrix.protected abstract U
AbstractDenseSemiringMatrix.makeLikeVector
(Shape shape, V[] entries) Constructs a vector of a similar type as this matrix.protected abstract U
AbstractDenseSemiringMatrix.makeLikeVector
(V[] entries) Constructs a vector of a similar type as this matrix.Sets a specified column of this matrix to an array.Sets a specified row of this matrix to an array.Sets the value of this matrix using a 2D array.Constructors in org.flag4j.arrays.backend.semiring_arrays with parameters of type SemiringModifierConstructorDescriptionprotected
AbstractCooSemiringMatrix
(Shape shape, W[] entries, int[] rowIndices, int[] colIndices) Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.protected
AbstractCooSemiringTensor
(Shape shape, V[] data, int[][] indices) Creates a tensor with the specified data and shape.protected
AbstractCooSemiringVector
(Shape shape, Y[] entries, int[] indices) Creates a sparse COO semiring vector with the specified data and shape.protected
AbstractCsrSemiringMatrix
(Shape shape, W[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.protected
AbstractDenseSemiringMatrix
(Shape shape, V[] entries) Creates a tensor with the specified data and shape.protected
AbstractDenseSemiringTensor
(Shape shape, V[] data) Creates a tensor with the specified data and shape.protected
AbstractDenseSemiringVector
(Shape shape, V[] data) Constructs a dense semiring vector with the specified data and shape. -
Uses of Semiring in org.flag4j.arrays.backend.smart_visitors
Methods in org.flag4j.arrays.backend.smart_visitors with type parameters of type SemiringModifier and TypeMethodDescription<U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> AddVisitor.visit
(SemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> AddVisitor.visit
(CooSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> AddVisitor.visit
(CsrSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> DivVisitor.visit
(SemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> DivVisitor.visit
(CooSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> DivVisitor.visit
(CsrSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> ElemMultVisitor.visit
(SemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> ElemMultVisitor.visit
(CooSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> ElemMultVisitor.visit
(CsrSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> MatMultVisitor.visit
(SemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> MatMultVisitor.visit
(CooSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> MatMultVisitor.visit
(CsrSemiringMatrix<U> matrix) MatrixVisitor.visit
(SemiringMatrix<U> matrix) MatrixVisitor.visit
(CooSemiringMatrix<U> matrix) MatrixVisitor.visit
(CsrSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> SubVisitor.visit
(SemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> SubVisitor.visit
(CooSemiringMatrix<U> matrix) <U extends Semiring<U>>
MatrixMixin<?, ?, ?, ?> SubVisitor.visit
(CsrSemiringMatrix<U> matrix) -
Uses of Semiring in org.flag4j.arrays.dense
Classes in org.flag4j.arrays.dense with type parameters of type SemiringModifier and TypeClassDescriptionclass
SemiringMatrix<T extends Semiring<T>>
Instances of this class represents a dense matrix backed by aSemiring
array.class
SemiringTensor<T extends Semiring<T>>
Instances of this class represent a dense tensor backed by aSemiring
array.class
SemiringVector<T extends Semiring<T>>
Instances of this class represents a dense vector backed by aSemiring
array.Methods in org.flag4j.arrays.dense with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
SemiringMatrix<T> SemiringMatrix.I
(int numRows, int numCols, T fieldValue) Constructs an identity-like matrix of the specified shape.static <T extends Semiring<T>>
SemiringMatrix<T> SemiringMatrix.I
(int size, T fieldValue) Constructs an identity matrix of the specified size.static <T extends Semiring<T>>
SemiringMatrix<T> Constructs an identity-like matrix of the specified shape.Methods in org.flag4j.arrays.dense with parameters of type SemiringModifier and TypeMethodDescriptionprotected CooSemiringMatrix
<T> SemiringMatrix.makeLikeCooMatrix
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix which is of a similar type as this dense matrix.protected CooSemiringTensor
<T> SemiringMatrix.makeLikeCooTensor
(Shape shape, T[] data, int[][] indices) Constructs a sparse COO tensor which is of a similar type as this dense tensor.protected CooSemiringTensor
<T> SemiringTensor.makeLikeCooTensor
(Shape shape, T[] data, int[][] indices) Constructs a sparse COO tensor which is of a similar type as this dense tensor.protected CooSemiringVector
<T> SemiringVector.makeLikeCooTensor
(Shape shape, T[] data, int[][] indices) Constructs a sparse COO tensor which is of a similar type as this dense tensor.SemiringMatrix.makeLikeCsrMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix which is of a similar type as this dense matrix.protected SemiringMatrix
<T> SemiringVector.makeLikeMatrix
(Shape shape, T[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.SemiringMatrix.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringTensor.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringVector.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringVector.makeLikeTensor
(T[] entries) Constructs a dense vector with the specifieddata
of the same type as the vector.protected SemiringVector
<T> SemiringMatrix.makeLikeVector
(Shape shape, T[] entries) Constructs a vector of a similar type as this matrix.protected SemiringVector
<T> SemiringMatrix.makeLikeVector
(T[] entries) Constructs a vector of a similar type as this matrix.Constructors in org.flag4j.arrays.dense with parameters of type SemiringModifierConstructorDescriptionSemiringMatrix
(int rows, int cos, T[] entries) Creates a dense semiring matrix with the specified data and shape.SemiringMatrix
(int rows, int cols, T[][] entries) Creates a dense semiring matrix with the specified data and shape.SemiringMatrix
(Shape shape, T[] entries) Creates a tensor with the specified data and shape.SemiringMatrix
(T[][] entries) Creates a dense semiring matrix with the specified data and shape.SemiringTensor
(Shape shape, T[] data) Creates a tensor with the specified data and shape.SemiringVector
(Shape shape, T[] data) Creates a semiring vector with the specified data and shape.SemiringVector
(T[] data) Creates a semiring vector with the specified data and shape. -
Uses of Semiring in org.flag4j.arrays.sparse
Classes in org.flag4j.arrays.sparse with type parameters of type SemiringModifier and TypeClassDescriptionclass
CooSemiringMatrix<T extends Semiring<T>>
Represents a sparse matrix whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specifiedSemiring
type.class
CooSemiringTensor<T extends Semiring<T>>
Represents a sparse tensor whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specifiedSemiring
type.class
CooSemiringVector<T extends Semiring<T>>
Represents a sparse vector whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specifiedSemiring
type.class
CsrSemiringMatrix<T extends Semiring<T>>
Instances of this class represent a sparse matrix using the compressed sparse row (CSR) format where all data elements belonging to a specifiedSemiring
type.Methods in org.flag4j.arrays.sparse with parameters of type SemiringModifier and TypeMethodDescriptionCsrSemiringMatrix.makeLikeCooMatrix
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.CooSemiringMatrix.makeLikeCsrMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.CooSemiringVector.makeLikeDenseMatrix
(Shape shape, T... entries) Constructs a dense matrix of a similar type as this vector with the specified shape and data.CooSemiringMatrix.makeLikeDenseTensor
(Shape shape, T[] entries) Constructs a dense tensor with the specifiedshape
anddata
which is a similar type to this sparse tensor.CooSemiringTensor.makeLikeDenseTensor
(Shape shape, T[] entries) Constructs a dense tensor that is a similar type as this sparse COO tensor.CooSemiringVector.makeLikeDenseTensor
(Shape shape, T... entries) Constructs a dense vector of a similar type as this vector with the specified shape and data.CsrSemiringMatrix.makeLikeDenseTensor
(Shape shape, T[] entries) Constructs a dense matrix which is of a similar type to this sparse CSR matrix.CooSemiringVector.makeLikeMatrix
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Constructs a COO matrix with the specified shape, non-zero data, and row and column indices.CooSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.CooSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO tensor of the same type as this tensor with the specified non-zero data and indices.CooSemiringTensor.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.CooSemiringTensor.makeLikeTensor
(Shape shape, T[] data, int[][] indices) Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.CooSemiringVector.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.CooSemiringVector.makeLikeTensor
(Shape shape, T[] entries, int[] indices) Constructs a sparse COO vector of the same type as this vector with the specified non-zero data and indices.CsrSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.CsrSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR tensor of the same type as this tensor with the specified non-zero data and indices.CooSemiringMatrix.makeLikeVector
(Shape shape, T[] entries, int[] indices) Constructs a sparse COO vector of a similar type to this COO matrix.Constructors in org.flag4j.arrays.sparse with parameters of type SemiringModifierConstructorDescriptionCooSemiringMatrix
(int rows, int cols, T[] entries, int[] rowIndices, int[] colIndices) Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.CooSemiringMatrix
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.CooSemiringTensor
(Shape shape, T[] data, int[][] indices) Creates a tensor with the specified data and shape.CooSemiringVector
(int size, T[] entries, int[] indices) Creates a tensor with the specified data and shape.CooSemiringVector
(Shape shape, T[] entries, int[] indices) Creates a tensor with the specified data and shape.CsrSemiringMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices. -
Uses of Semiring in org.flag4j.concurrency
Methods in org.flag4j.concurrency with type parameters of type SemiringModifier and TypeMethodDescription<T extends Semiring<T>>
voidApplies the specified binary operation on the two dense tensors.Methods in org.flag4j.concurrency with parameters of type Semiring -
Uses of Semiring in org.flag4j.linalg.ops
Methods in org.flag4j.linalg.ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <V extends Semiring<V>>
AbstractDenseSemiringTensor<?, V> TransposeDispatcher.dispatchTensor
(AbstractDenseSemiringTensor<?, V> src, int[] axes) Dispatches a tensor transpose problem to the appropriate algorithm based on its shape and size. -
Uses of Semiring in org.flag4j.linalg.ops.common.semiring_ops
Methods in org.flag4j.linalg.ops.common.semiring_ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
voidSemiringOps.add
(T[] src, T summand, T[] dest) Sums a value to each entry of tensor.static <T extends Semiring<T>>
intCompareSemiring.argmax
(T... values) Computes the index of the maximum value in the specified array.static <T extends Semiring<T>>
intCompareSemiring.argmin
(T... values) Computes the index of the minimum value in the specified array.static <T extends Semiring<T>>
booleanSemiringProperties.isOnes
(T[] src) Checks if an array contains only ones.static <T extends Semiring<T>>
booleanSemiringProperties.isZeros
(T[] src) Checks if an array contains only zeros.static <T extends Semiring<T>>
T[]Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.TransformSemiRing.mapReduce
(T[] values, Function<T, T> mapper, BinaryOperator<T> accumulator) Applies a map-reduce procedure to an array ofSemiring
values.static <T extends Semiring<T>>
TCompareSemiring.max
(T... values) Computes the maximum value in the specified array.static <T extends Semiring<T>>
TCompareSemiring.min
(T... values) Computes the minimum value in the specified array.static <T extends Semiring<T>>
TAggregateSemiring.prod
(T... entries) Computes the sum of all data in this tensor.TransformSemiRing.reduce
(T[] values, BinaryOperator<T> accumulator) Reduces the given array of field elements to a single element by repeatedly applying a binary operator to combine elements.static <T extends Semiring<T>>
voidSemiringOps.scalMult
(T[] src, T factor, T[] dest) Computes the scalar multiplication of a tensor.static <T extends Semiring<T>>
voidSemiringOps.scalMult
(T[] src, T factor, T[] dest, int start, int stop) Computes the scalar multiplication of a tensor.static <T extends Semiring<T>>
TAggregateSemiring.sum
(T... entries) Computes the sum of all data in this tensor.Methods in org.flag4j.linalg.ops.common.semiring_ops that return SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.TransformSemiRing.mapReduce
(T[] values, Function<T, T> mapper, BinaryOperator<T> accumulator) Applies a map-reduce procedure to an array ofSemiring
values.TransformSemiRing.reduce
(T[] values, BinaryOperator<T> accumulator) Reduces the given array of field elements to a single element by repeatedly applying a binary operator to combine elements.Methods in org.flag4j.linalg.ops.common.semiring_ops with parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
voidSemiringOps.add
(T[] src, T summand, T[] dest) Sums a value to each entry of tensor.static <T extends Semiring<T>>
intCompareSemiring.argmax
(T... values) Computes the index of the maximum value in the specified array.static <T extends Semiring<T>>
intCompareSemiring.argmin
(T... values) Computes the index of the minimum value in the specified array.static <T extends Semiring<T>>
booleanSemiringProperties.isOnes
(T[] src) Checks if an array contains only ones.static <T extends Semiring<T>>
booleanSemiringProperties.isZeros
(T[] src) Checks if an array contains only zeros.static <T extends Semiring<T>>
T[]Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.TransformSemiRing.mapReduce
(T[] values, Function<T, T> mapper, BinaryOperator<T> accumulator) Applies a map-reduce procedure to an array ofSemiring
values.static <T extends Semiring<T>>
TCompareSemiring.max
(T... values) Computes the maximum value in the specified array.static <T extends Semiring<T>>
TCompareSemiring.min
(T... values) Computes the minimum value in the specified array.static <T extends Semiring<T>>
TAggregateSemiring.prod
(T... entries) Computes the sum of all data in this tensor.TransformSemiRing.reduce
(T[] values, BinaryOperator<T> accumulator) Reduces the given array of field elements to a single element by repeatedly applying a binary operator to combine elements.static <T extends Semiring<T>>
voidSemiringOps.scalMult
(T[] src, T factor, T[] dest) Computes the scalar multiplication of a tensor.static <T extends Semiring<T>>
voidSemiringOps.scalMult
(T[] src, T factor, T[] dest, int start, int stop) Computes the scalar multiplication of a tensor.static <T extends Semiring<T>>
TAggregateSemiring.sum
(T... entries) Computes the sum of all data in this tensor. -
Uses of Semiring in org.flag4j.linalg.ops.dense
Classes in org.flag4j.linalg.ops.dense with type parameters of type SemiringModifier and TypeClassDescriptionclass
DenseSemiringTensorDot<T extends Semiring<T>>
Instances of this class can be used to compute the tensor dot product between two dense tensors.Methods in org.flag4j.linalg.ops.dense with parameters of type SemiringModifier and TypeMethodDescriptionvoid
Computes this tensor dot product as specified in the constructor.Constructors in org.flag4j.linalg.ops.dense with parameters of type SemiringModifierConstructorDescriptionDenseSemiringTensorDot
(Shape shape1, T[] src1, Shape shape2, T[] src2, int[] src1Axes, int[] src2Axes) Constructs a tensor dot product problem for computing the tensor contraction of two tensors over the specified set of axes. -
Uses of Semiring in org.flag4j.linalg.ops.dense_sparse.csr.semiring_ops
Methods in org.flag4j.linalg.ops.dense_sparse.csr.semiring_ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
AbstractDenseSemiringMatrix<?, ?, T> DenseCsrSemiringMatMult.standard
(AbstractCsrSemiringMatrix<?, ?, ?, T> src1, AbstractDenseSemiringMatrix<?, ?, T> src2) Computes the matrix multiplication between a sparse CSR matrix and a dense field matrix.static <T extends Semiring<T>>
AbstractDenseSemiringMatrix<?, ?, T> DenseCsrSemiringMatMult.standard
(AbstractDenseSemiringMatrix<?, ?, T> src1, AbstractCsrSemiringMatrix<?, ?, ?, T> src2) Computes the matrix multiplication between a dense matrix and a sparse CSR field matrix.static <T extends Semiring<T>>
AbstractDenseSemiringVector<?, ?, T> DenseCsrSemiringMatMult.standardVector
(AbstractCsrSemiringMatrix<?, ?, ?, T> src1, AbstractDenseSemiringVector<?, ?, T> src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a dense field vector. -
Uses of Semiring in org.flag4j.linalg.ops.dense.semiring_ops
Methods in org.flag4j.linalg.ops.dense.semiring_ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]Computes the element-wise addition of two tensors.static <T extends Semiring<T>>
voidComputes the matrix multiplication of two dense matrices using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandard
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDynamically chooses and applies an element-wise multiplication algorithm to use based on the number of data in the tensors.static <T extends Semiring<T>>
voidDispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix multiply-transpose problem equivalent tosrc1.mult(src2.T())
to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix-vector multiplication problem to the appropriate algorithm based on the size of the matrix and vector.static <T extends Semiring<T>>
TDenseSemiringVectorOps.dotProduct
(T[] src1, T[] src2) Computes the vector dot product for two vectors.static <T extends Semiring<T>>
voidComputes the element-wise multiplication of two tensors.static <T extends Semiring<T>>
T[]Computes the element-wise product of two tensors.static <T extends Semiring<T>>
voidDenseSemiringElemMult.elemMultConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the element-wise multiplication of two tensors using a concurrent algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlockedConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent algorithm.static <T extends Semiring<T>>
voidDenseSemiringVectorOps.outerProduct
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors.static <T extends Semiring<T>>
voidDenseSemiringVectorOps.outerProductConcurrent
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors using a concurrent implementation.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.standardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using the standard algorithm.static <T extends Semiring<T>>
voidComputes the generalized trace of this tensor along the specified axes.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries) Converts a dense tensor to an equivalent sparse COO tensor.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries, double estimatedSparsity) Converts a dense tensor to an equivalent sparse COO tensor.Methods in org.flag4j.linalg.ops.dense.semiring_ops that return SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]Computes the element-wise addition of two tensors.static <T extends Semiring<T>>
T[]Computes the element-wise product of two tensors.Methods in org.flag4j.linalg.ops.dense.semiring_ops with parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]Computes the element-wise addition of two tensors.static <T extends Semiring<T>>
voidComputes the matrix multiplication of two dense matrices using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandard
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDynamically chooses and applies an element-wise multiplication algorithm to use based on the number of data in the tensors.static <T extends Semiring<T>>
voidDispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix multiply-transpose problem equivalent tosrc1.mult(src2.T())
to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix-vector multiplication problem to the appropriate algorithm based on the size of the matrix and vector.static <T extends Semiring<T>>
TDenseSemiringVectorOps.dotProduct
(T[] src1, T[] src2) Computes the vector dot product for two vectors.static <T extends Semiring<T>>
voidComputes the element-wise multiplication of two tensors.static <T extends Semiring<T>>
T[]Computes the element-wise product of two tensors.static <T extends Semiring<T>>
voidDenseSemiringElemMult.elemMultConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the element-wise multiplication of two tensors using a concurrent algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlockedConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent algorithm.static <T extends Semiring<T>>
voidDenseSemiringVectorOps.outerProduct
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors.static <T extends Semiring<T>>
voidDenseSemiringVectorOps.outerProductConcurrent
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors using a concurrent implementation.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.standardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using the standard algorithm.static <T extends Semiring<T>>
voidComputes the generalized trace of this tensor along the specified axes.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries) Converts a dense tensor to an equivalent sparse COO tensor.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries, double estimatedSparsity) Converts a dense tensor to an equivalent sparse COO tensor. -
Uses of Semiring in org.flag4j.linalg.ops.sparse
Methods in org.flag4j.linalg.ops.sparse with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
booleanSparseUtils.CSREquals
(AbstractCsrSemiringMatrix<?, ?, ?, T> src1, AbstractCsrSemiringMatrix<?, ?, ?, T> src2) Checks if twoCSR Field matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.static <T extends Semiring<T>>
SparseVectorData<T> Drops any explicit zeros in this sparse COO vector.static <T extends Semiring<T>>
SparseTensorData<T> Drops any explicit zeros in this sparse COO tensor.static <T extends Semiring<T>>
SparseMatrixData<T> Drops any explicit zeros in this sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> SparseUtils.dropZerosCsr
(Shape shape, T[] data, int[] rowPointers, int[] colIndices) Drops all explicit zeros within a sparse CSR matrix.Methods in org.flag4j.linalg.ops.sparse with parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
SparseVectorData<T> Drops any explicit zeros in this sparse COO vector.static <T extends Semiring<T>>
SparseTensorData<T> Drops any explicit zeros in this sparse COO tensor.static <T extends Semiring<T>>
SparseMatrixData<T> Drops any explicit zeros in this sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> SparseUtils.dropZerosCsr
(Shape shape, T[] data, int[] rowPointers, int[] colIndices) Drops all explicit zeros within a sparse CSR matrix. -
Uses of Semiring in org.flag4j.linalg.ops.sparse.coo
Classes in org.flag4j.linalg.ops.sparse.coo with type parameters of type SemiringModifier and TypeClassDescriptionclass
CooTensorDot<T extends Semiring<T>>
Instances of this class can be used to compute the tensor dot product between two sparse COO tensors.Methods in org.flag4j.linalg.ops.sparse.coo with parameters of type SemiringModifier and TypeMethodDescriptionvoid
Computes this tensor dot product as specified in the constructor.Constructors in org.flag4j.linalg.ops.sparse.coo with parameters of type SemiringModifierConstructorDescriptionCooTensorDot
(Shape shape1, T[] src1, int[][] indices1, Shape shape2, T[] src2, int[][] indices2, int[] src1Axes, int[] src2Axes) Constructs a tensor dot product problem for computing the tensor contraction of two tensors over the specified set of axes. -
Uses of Semiring in org.flag4j.linalg.ops.sparse.coo.semiring_ops
Methods in org.flag4j.linalg.ops.sparse.coo.semiring_ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.add
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Adds two sparse matrices.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.add
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Sums two complex sparse COO tensors and stores result in a new COO tensor.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.add
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector addition between two real sparse vectors.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
booleanCooSemiringEquals.cooMatrixEquals
(AbstractCooSemiringMatrix<?, ?, ?, T> a, AbstractCooSemiringMatrix<?, ?, ?, T> b) Checks if two real sparse matrices are real.static <T extends Semiring<T>>
booleanCooSemiringEquals.cooTensorEquals
(AbstractCooSemiringTensor<?, ?, T> a, AbstractCooSemiringTensor<?, ?, T> b) Checks if two real sparse tensors are real.static <T extends Semiring<T>>
booleanCooSemiringEquals.cooVectorEquals
(AbstractCooSemiringVector<?, ?, ?, ?, T> a, AbstractCooSemiringVector<?, ?, ?, ?, T> b) Checks if two real sparse vectors are real.static <T extends Semiring<T>>
TCooSemiringVectorOps.dot
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the dot product between two sparse COO vectors.static <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.elemMult
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Multiplies two sparse matrices element-wise.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.elemMult
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Computes the element-wise multiplication between two complex sparse COO tensors.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.elemMult
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector multiplication between two real sparse vectors.static <T extends Semiring<T>>
booleanCooSemiringMatrixOps.isIdentity
(AbstractCooSemiringMatrix<?, ?, ?, T> src) Checks if a complex sparse matrix is the identity matrix.static <T extends Semiring<T>>
booleanCooSemiringMatrixProperties.isIdentity
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Checks if a complex sparse COO matrix is the identity matrix.static <T extends Semiring<T>>
voidCooSemiringVectorOps.outerProduct
(T[] src1, int[] src1Indices, int src1Size, T[] src2, int[] src2Indices, T[] dest) Computes the vector outer product between two sparse COO vectors.static <T extends Semiring<T>>
voidCooSemiringMatMult.standard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.standardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.static <T extends Semiring<T>>
SparseTensorData<T> Computes the generalized trace of a tensor along the specified axes.Methods in org.flag4j.linalg.ops.sparse.coo.semiring_ops with parameters of type SemiringModifier and TypeMethodDescriptionstatic <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.add
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Adds two sparse matrices.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.add
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Sums two complex sparse COO tensors and stores result in a new COO tensor.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.add
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector addition between two real sparse vectors.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
TCooSemiringVectorOps.dot
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the dot product between two sparse COO vectors.static <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.elemMult
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Multiplies two sparse matrices element-wise.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.elemMult
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Computes the element-wise multiplication between two complex sparse COO tensors.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.elemMult
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector multiplication between two real sparse vectors.static <T extends Semiring<T>>
booleanCooSemiringMatrixProperties.isIdentity
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Checks if a complex sparse COO matrix is the identity matrix.static <T extends Semiring<T>>
voidCooSemiringVectorOps.outerProduct
(T[] src1, int[] src1Indices, int src1Size, T[] src2, int[] src2Indices, T[] dest) Computes the vector outer product between two sparse COO vectors.static <T extends Semiring<T>>
voidCooSemiringMatMult.standard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.standardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.static <T extends Semiring<T>>
SparseTensorData<T> Computes the generalized trace of a tensor along the specified axes. -
Uses of Semiring in org.flag4j.linalg.ops.sparse.csr.semiring_ops
Methods in org.flag4j.linalg.ops.sparse.csr.semiring_ops with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
booleanSemiringCsrProperties.isIdentity
(AbstractCsrSemiringMatrix<?, ?, ?, T> src) Checks if thesrc
matrix is the identity matrix.static <T extends Semiring<T>>
booleanSemiringCsrProperties.isIdentity
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrc
matrix is the identity matrix.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is lower-triangular.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is upper-triangular.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standard
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices, T[] destEntries, Semiring<T> zero) Computes the matrix multiplication between two sparse CSR matrices.static <T extends Semiring<T>>
SparseMatrixData<T> SemiringCsrMatMult.standardToSparse
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standardVector
(Shape shape, T[] src1, int[] rowPointers, int[] colIndices, int size, T[] src2, int[] indices, T[] dest, T zero) Computes the matrix-vector multiplication between a sparse CSR matrix and a sparse COO vector.static <T extends Semiring<T>>
TSemiringCsrOps.trace
(T[] entries, int[] rowPointers, int[] colIndices) Computes the trace of a sparse CSR matrix.Methods in org.flag4j.linalg.ops.sparse.csr.semiring_ops with parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
booleanSemiringCsrProperties.isIdentity
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrc
matrix is the identity matrix.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is lower-triangular.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is upper-triangular.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standard
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices, T[] destEntries, Semiring<T> zero) Computes the matrix multiplication between two sparse CSR matrices.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standard
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices, T[] destEntries, Semiring<T> zero) Computes the matrix multiplication between two sparse CSR matrices.static <T extends Semiring<T>>
SparseMatrixData<T> SemiringCsrMatMult.standardToSparse
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standardVector
(Shape shape, T[] src1, int[] rowPointers, int[] colIndices, int size, T[] src2, int[] indices, T[] dest, T zero) Computes the matrix-vector multiplication between a sparse CSR matrix and a sparse COO vector.static <T extends Semiring<T>>
TSemiringCsrOps.trace
(T[] entries, int[] rowPointers, int[] colIndices) Computes the trace of a sparse CSR matrix. -
Uses of Semiring in org.flag4j.util
Methods in org.flag4j.util with type parameters of type SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]ArrayUtils.flatten
(T[][] src) Flattens a two-dimensional array.Methods in org.flag4j.util that return SemiringModifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]ArrayUtils.flatten
(T[][] src) Flattens a two-dimensional array.Methods in org.flag4j.util with parameters of type Semiring