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 Semiring
    Modifier and Type
    Interface
    Description
    interface 
    Semiring<T extends Semiring<T>>
    Defines a mathematical semiring structure and specifies the operations that semiring elements must support.
    Modifier and Type
    Interface
    Description
    interface 
    Field<T extends Field<T>>
    Defines a mathematical field structure and specifies the operations that field elements must support.
    interface 
    Ring<T extends Ring<T>>
    Defines a mathematical ring structure and specifies the operations that ring elements must support.
    Classes in org.flag4j.algebraic_structures that implement Semiring
    Modifier and Type
    Class
    Description
    class 
    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 Semiring
    Modifier
    Constructor
    Description
     
    SmartMatrix(T[][] matrix)
    Constructs a SmartMatrix from a 2D SemiringMatrix array.
  • Uses of Semiring in org.flag4j.arrays.backend.semiring_arrays

    Classes in org.flag4j.arrays.backend.semiring_arrays with type parameters of type Semiring
    Modifier and Type
    Class
    Description
    class 
    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 
    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 
    The base class for all dense matrices whose elements are members of a Semiring.
    class 
    The base class for all dense Semiring tensors.
    class 
    The base class for all dense vectors whose data are Semiring 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 a Semiring.
    Modifier and Type
    Field
    Description
    protected 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.
    Modifier and Type
    Method
    Description
    default 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 Semiring
    Modifier and Type
    Method
    Description
    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.
    AbstractCooSemiringMatrix.makeLikeCsrMatrix(Shape shape, W[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.
    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 specified shape and data 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 specified shape and data.
    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 specified data 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.
    AbstractDenseSemiringMatrix.setCol(V[] col, int colIdx)
    Sets a specified column of this matrix to an array.
    AbstractDenseSemiringMatrix.setRow(V[] row, int rowIdx)
    Sets a specified row of this matrix to an array.
    AbstractDenseSemiringMatrix.setValues(V[][] values)
    Sets the value of this matrix using a 2D array.
    Constructors in org.flag4j.arrays.backend.semiring_arrays with parameters of type Semiring
    Modifier
    Constructor
    Description
    protected
    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 specified shape, 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
    Creates a tensor with the specified data and shape.
    protected
    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 Semiring
    Modifier and Type
    Method
    Description
    <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)
     
    abstract <U extends Semiring<U>>
    T
    MatrixVisitor.visit(SemiringMatrix<U> matrix)
     
    abstract <U extends Semiring<U>>
    T
    MatrixVisitor.visit(CooSemiringMatrix<U> matrix)
     
    abstract <U extends Semiring<U>>
    T
    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 Semiring
    Modifier and Type
    Class
    Description
    class 
    SemiringMatrix<T extends Semiring<T>>
    Instances of this class represents a dense matrix backed by a Semiring array.
    class 
    SemiringTensor<T extends Semiring<T>>
    Instances of this class represent a dense tensor backed by a Semiring array.
    class 
    SemiringVector<T extends Semiring<T>>
    Instances of this class represents a dense vector backed by a Semiring array.
    Methods in org.flag4j.arrays.dense with type parameters of type Semiring
    Modifier and Type
    Method
    Description
    static <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>
    SemiringMatrix.I(Shape shape, T fieldValue)
    Constructs an identity-like matrix of the specified shape.
    Methods in org.flag4j.arrays.dense with parameters of type Semiring
    Modifier and Type
    Method
    Description
    protected 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 specified shape and data.
    SemiringMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    SemiringTensor.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    SemiringVector.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    SemiringVector.makeLikeTensor(T[] entries)
    Constructs a dense vector with the specified data 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 Semiring
    Modifier
    Constructor
    Description
     
    SemiringMatrix(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 Semiring
    Modifier and Type
    Class
    Description
    class 
    Represents a sparse matrix whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specified Semiring type.
    class 
    Represents a sparse tensor whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specified Semiring type.
    class 
    Represents a sparse vector whose non-zero elements are stored in Coordinate List (COO) format, with all data elements belonging to a specified Semiring type.
    class 
    Instances of this class represent a sparse matrix using the compressed sparse row (CSR) format where all data elements belonging to a specified Semiring type.
    Methods in org.flag4j.arrays.sparse with parameters of type Semiring
    Modifier and Type
    Method
    Description
    CsrSemiringMatrix.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 specified shape and data 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 the shape and data.
    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 the shape and data.
    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 the shape and data.
    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 the shape and data.
    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 Semiring
    Modifier
    Constructor
    Description
     
    CooSemiringMatrix(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 specified shape, 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 Semiring
    Modifier and Type
    Method
    Description
    <T extends Semiring<T>>
    void
    DenseSemiringTensorBinaryOperation.apply(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Applies the specified binary operation on the two dense tensors.
    Methods in org.flag4j.concurrency with parameters of type Semiring
    Modifier and Type
    Method
    Description
    <T extends Semiring<T>>
    void
    DenseSemiringTensorBinaryOperation.apply(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Applies the specified binary operation on the two dense tensors.
  • Uses of Semiring in org.flag4j.linalg.ops

    Methods in org.flag4j.linalg.ops with type parameters of type Semiring
    Modifier and Type
    Method
    Description
    static <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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    void
    SemiringOps.add(T[] src, T summand, T[] dest)
    Sums a value to each entry of tensor.
    static <T extends Semiring<T>>
    int
    CompareSemiring.argmax(T... values)
    Computes the index of the maximum value in the specified array.
    static <T extends Semiring<T>>
    int
    CompareSemiring.argmin(T... values)
    Computes the index of the minimum value in the specified array.
    static <T extends Semiring<T>>
    boolean
    SemiringProperties.isOnes(T[] src)
    Checks if an array contains only ones.
    static <T extends Semiring<T>>
    boolean
    SemiringProperties.isZeros(T[] src)
    Checks if an array contains only zeros.
    static <T extends Semiring<T>>
    T[]
    TransformSemiRing.map(T[] values, Function<T,T> mapper)
    Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.
    static <T extends Semiring<T>>
    Semiring
    TransformSemiRing.mapReduce(T[] values, Function<T,T> mapper, BinaryOperator<T> accumulator)
    Applies a map-reduce procedure to an array of Semiring values.
    static <T extends Semiring<T>>
    T
    CompareSemiring.max(T... values)
    Computes the maximum value in the specified array.
    static <T extends Semiring<T>>
    T
    CompareSemiring.min(T... values)
    Computes the minimum value in the specified array.
    static <T extends Semiring<T>>
    T
    AggregateSemiring.prod(T... entries)
    Computes the sum of all data in this tensor.
    static <T extends Semiring<T>>
    Semiring<T>
    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>>
    void
    SemiringOps.scalMult(T[] src, T factor, T[] dest)
    Computes the scalar multiplication of a tensor.
    static <T extends Semiring<T>>
    void
    SemiringOps.scalMult(T[] src, T factor, T[] dest, int start, int stop)
    Computes the scalar multiplication of a tensor.
    static <T extends Semiring<T>>
    T
    AggregateSemiring.sum(T... entries)
    Computes the sum of all data in this tensor.
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    TransformSemiRing.map(T[] values, Function<T,T> mapper)
    Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.
    static <T extends Semiring<T>>
    Semiring
    TransformSemiRing.mapReduce(T[] values, Function<T,T> mapper, BinaryOperator<T> accumulator)
    Applies a map-reduce procedure to an array of Semiring values.
    static <T extends Semiring<T>>
    Semiring<T>
    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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    void
    SemiringOps.add(T[] src, T summand, T[] dest)
    Sums a value to each entry of tensor.
    static <T extends Semiring<T>>
    int
    CompareSemiring.argmax(T... values)
    Computes the index of the maximum value in the specified array.
    static <T extends Semiring<T>>
    int
    CompareSemiring.argmin(T... values)
    Computes the index of the minimum value in the specified array.
    static <T extends Semiring<T>>
    boolean
    SemiringProperties.isOnes(T[] src)
    Checks if an array contains only ones.
    static <T extends Semiring<T>>
    boolean
    SemiringProperties.isZeros(T[] src)
    Checks if an array contains only zeros.
    static <T extends Semiring<T>>
    T[]
    TransformSemiRing.map(T[] values, Function<T,T> mapper)
    Applies a specified function to each element of the given array and returns a new array containing the results of the mapping operation.
    static <T extends Semiring<T>>
    Semiring
    TransformSemiRing.mapReduce(T[] values, Function<T,T> mapper, BinaryOperator<T> accumulator)
    Applies a map-reduce procedure to an array of Semiring values.
    static <T extends Semiring<T>>
    T
    CompareSemiring.max(T... values)
    Computes the maximum value in the specified array.
    static <T extends Semiring<T>>
    T
    CompareSemiring.min(T... values)
    Computes the minimum value in the specified array.
    static <T extends Semiring<T>>
    T
    AggregateSemiring.prod(T... entries)
    Computes the sum of all data in this tensor.
    static <T extends Semiring<T>>
    Semiring<T>
    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>>
    void
    SemiringOps.scalMult(T[] src, T factor, T[] dest)
    Computes the scalar multiplication of a tensor.
    static <T extends Semiring<T>>
    void
    SemiringOps.scalMult(T[] src, T factor, T[] dest, int start, int stop)
    Computes the scalar multiplication of a tensor.
    static <T extends Semiring<T>>
    T
    AggregateSemiring.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 Semiring
    Modifier and Type
    Class
    Description
    class 
    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 Semiring
    Modifier and Type
    Method
    Description
    void
    DenseSemiringTensorDot.compute(T[] dest)
    Computes this tensor dot product as specified in the constructor.
    Constructors in org.flag4j.linalg.ops.dense with parameters of type Semiring
    Modifier
    Constructor
    Description
     
    DenseSemiringTensorDot(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 Semiring
    Modifier and Type
    Method
    Description
    static <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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.add(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise addition of two tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.blocked(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of two dense matrices using a blocked algorithm.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringElemMult.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dynamically chooses and applies an element-wise multiplication algorithm to use based on the number of data in the tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.dispatchTranspose(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dispatches a matrix multiply-transpose problem equivalent to src1.mult(src2.T()) to the appropriate algorithm based on the size of the matrices.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.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>>
    T
    DenseSemiringVectorOps.dotProduct(T[] src1, T[] src2)
    Computes the vector dot product for two vectors.
    static <T extends Semiring<T>>
    void
    DenseSemiringElemMult.elemMult(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise multiplication of two tensors.
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.elemMult(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise product of two tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringElemMult.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringVectorOps.outerProduct(T[] src1, T[] src2, T[] dest)
    Computes the vector outer product between two real dense vectors.
    static <T extends Semiring<T>>
    void
    DenseSemiringVectorOps.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>>
    void
    DenseSemiringMatMult.reordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.standard(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between two dense matrices using the standard algorithm.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringOps.tensorTr(Shape shape, T[] src, int axis1, int axis2, Shape destShape, T[] dest)
    Computes the generalized trace of this tensor along the specified axes.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    DenseSemiringConversions.toCoo(Shape shape, T[] entries)
    Converts a dense matrix to an equivalent sparse COO matrix.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    DenseSemiringConversions.toCoo(Shape shape, T[] entries, double estimatedSparsity)
    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.
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.add(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise addition of two tensors.
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.elemMult(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise product of two tensors.
    Methods in org.flag4j.linalg.ops.dense.semiring_ops with parameters of type Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.add(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise addition of two tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.blocked(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of two dense matrices using a blocked algorithm.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringElemMult.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dynamically chooses and applies an element-wise multiplication algorithm to use based on the number of data in the tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.dispatchTranspose(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dispatches a matrix multiply-transpose problem equivalent to src1.mult(src2.T()) to the appropriate algorithm based on the size of the matrices.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMultDispatcher.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>>
    T
    DenseSemiringVectorOps.dotProduct(T[] src1, T[] src2)
    Computes the vector dot product for two vectors.
    static <T extends Semiring<T>>
    void
    DenseSemiringElemMult.elemMult(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise multiplication of two tensors.
    static <T extends Semiring<T>>
    T[]
    DenseSemiringOps.elemMult(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise product of two tensors.
    static <T extends Semiring<T>>
    void
    DenseSemiringElemMult.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringMatMultTranspose.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>>
    void
    DenseSemiringVectorOps.outerProduct(T[] src1, T[] src2, T[] dest)
    Computes the vector outer product between two real dense vectors.
    static <T extends Semiring<T>>
    void
    DenseSemiringVectorOps.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>>
    void
    DenseSemiringMatMult.reordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.standard(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between two dense matrices using the standard algorithm.
    static <T extends Semiring<T>>
    void
    DenseSemiringMatMult.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>>
    void
    DenseSemiringOps.tensorTr(Shape shape, T[] src, int axis1, int axis2, Shape destShape, T[] dest)
    Computes the generalized trace of this tensor along the specified axes.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    DenseSemiringConversions.toCoo(Shape shape, T[] entries)
    Converts a dense matrix to an equivalent sparse COO matrix.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    DenseSemiringConversions.toCoo(Shape shape, T[] entries, double estimatedSparsity)
    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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    boolean
    SparseUtils.CSREquals(AbstractCsrSemiringMatrix<?,?,?,T> src1, AbstractCsrSemiringMatrix<?,?,?,T> src2)
    Checks if two CSR 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>
    SparseUtils.dropZeros(Shape shape, T[] data, int[] indices)
    Drops any explicit zeros in this sparse COO vector.
    static <T extends Semiring<T>>
    SparseTensorData<T>
    SparseUtils.dropZeros(Shape shape, T[] data, int[][] indices)
    Drops any explicit zeros in this sparse COO tensor.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    SparseUtils.dropZeros(Shape shape, T[] data, int[] rowIndices, int[] colIndices)
    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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    SparseVectorData<T>
    SparseUtils.dropZeros(Shape shape, T[] data, int[] indices)
    Drops any explicit zeros in this sparse COO vector.
    static <T extends Semiring<T>>
    SparseTensorData<T>
    SparseUtils.dropZeros(Shape shape, T[] data, int[][] indices)
    Drops any explicit zeros in this sparse COO tensor.
    static <T extends Semiring<T>>
    SparseMatrixData<T>
    SparseUtils.dropZeros(Shape shape, T[] data, int[] rowIndices, int[] colIndices)
    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 Semiring
    Modifier and Type
    Class
    Description
    class 
    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 Semiring
    Modifier and Type
    Method
    Description
    void
    CooTensorDot.compute(T[] dest)
    Computes this tensor dot product as specified in the constructor.
    Constructors in org.flag4j.linalg.ops.sparse.coo with parameters of type Semiring
    Modifier
    Constructor
    Description
     
    CooTensorDot(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 Semiring
    Modifier and Type
    Method
    Description
    static <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>>
    void
    CooSemiringMatMult.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>>
    void
    CooSemiringMatMult.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>>
    boolean
    CooSemiringEquals.cooMatrixEquals(AbstractCooSemiringMatrix<?,?,?,T> a, AbstractCooSemiringMatrix<?,?,?,T> b)
    Checks if two real sparse matrices are real.
    static <T extends Semiring<T>>
    boolean
    Checks if two real sparse tensors are real.
    static <T extends Semiring<T>>
    boolean
    CooSemiringEquals.cooVectorEquals(AbstractCooSemiringVector<?,?,?,?,T> a, AbstractCooSemiringVector<?,?,?,?,T> b)
    Checks if two real sparse vectors are real.
    static <T extends Semiring<T>>
    T
    CooSemiringVectorOps.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>>
    boolean
    CooSemiringMatrixOps.isIdentity(AbstractCooSemiringMatrix<?,?,?,T> src)
    Checks if a complex sparse matrix is the identity matrix.
    static <T extends Semiring<T>>
    boolean
    CooSemiringMatrixProperties.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>>
    void
    CooSemiringVectorOps.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>>
    void
    CooSemiringMatMult.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>>
    void
    CooSemiringMatMult.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>
    CooSemiringTensorOps.tensorTr(Shape shape, T[] entries, int[][] indices, int axis1, int axis2)
    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 Semiring
    Modifier and Type
    Method
    Description
    static <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>>
    void
    CooSemiringMatMult.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>>
    void
    CooSemiringMatMult.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>>
    T
    CooSemiringVectorOps.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>>
    boolean
    CooSemiringMatrixProperties.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>>
    void
    CooSemiringVectorOps.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>>
    void
    CooSemiringMatMult.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>>
    void
    CooSemiringMatMult.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>
    CooSemiringTensorOps.tensorTr(Shape shape, T[] entries, int[][] indices, int axis1, int axis2)
    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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isIdentity(AbstractCsrSemiringMatrix<?,?,?,T> src)
    Checks if the src matrix is the identity matrix.
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isIdentity(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if the src matrix is the identity matrix.
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isTriL(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if a sparse CSR matrix is lower-triangular.
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isTriU(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if a sparse CSR matrix is upper-triangular.
    static <T extends Semiring<T>>
    void
    SemiringCsrMatMult.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>>
    void
    SemiringCsrMatMult.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>>
    T
    SemiringCsrOps.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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isIdentity(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if the src matrix is the identity matrix.
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isTriL(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if a sparse CSR matrix is lower-triangular.
    static <T extends Semiring<T>>
    boolean
    SemiringCsrProperties.isTriU(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Checks if a sparse CSR matrix is upper-triangular.
    static <T extends Semiring<T>>
    void
    SemiringCsrMatMult.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>>
    void
    SemiringCsrMatMult.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>>
    void
    SemiringCsrMatMult.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>>
    T
    SemiringCsrOps.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 Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    ArrayUtils.flatten(T[][] src)
    Flattens a two-dimensional array.
    Methods in org.flag4j.util that return Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    ArrayUtils.flatten(T[][] src)
    Flattens a two-dimensional array.
    Methods in org.flag4j.util with parameters of type Semiring
    Modifier and Type
    Method
    Description
    static <T extends Semiring<T>>
    T[]
    ArrayUtils.flatten(T[][] src)
    Flattens a two-dimensional array.