Uses of Class
org.flag4j.arrays.Shape

Packages that use Shape
Package
Description
 
 
 
 
 
 
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
Utilities, configurations, and management for multithreaded implementations.
IO for vector, matrix, and tensor objects.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This package contains classes for Pseudo-random generation of real/complex numbers, and arrays, vectors, matrices, and tensors.
 
  • Uses of Shape in org.flag4j.arrays

    Methods in org.flag4j.arrays that return Shape
    Modifier and Type
    Method
    Description
    Shape.flatten()
    Flattens this shape to a rank-1 shape with dimension equal to the product of all of this shape's dimensions.
    SmartMatrix.getShape()
    Gets the shape of this matrix.
    Shape.permuteAxes(int... axes)
    Permutes the axes of this shape.
    SparseMatrixData.shape()
    Returns the value of the shape record component.
    SparseTensorData.shape()
    Returns the value of the shape record component.
    SparseVectorData.shape()
    Returns the value of the shape record component.
    Shape.slice(int startIdx)
    Returns a slice of this shape starting from the specified index to the end of this shape's dimensions.
    Shape.slice(int startIdx, int stopIdx)
    Returns a slice of this shape from the specified start index to the stop index of this shape's dimensions.
    Shape.swapAxes(int axis1, int axis2)
    Swaps two axes of this shape.
    Shape.unsafePermuteAxes(int... axes)
    Permutes the axes of this shape.
    Constructors in org.flag4j.arrays with parameters of type Shape
    Modifier
    Constructor
    Description
     
    SparseMatrixData(Shape shape, List<T> data, List<Integer> rowData, List<Integer> colData)
    Creates an instance of a SparseMatrixData record class.
     
    SparseTensorData(Shape shape, List<T> data, List<int[]> indices)
    Creates an instance of a SparseTensorData record class.
     
    SparseVectorData(Shape shape, List<T> data, List<Integer> indices)
    Creates an instance of a SparseVectorData record class.
  • Uses of Shape in org.flag4j.arrays.backend

    Fields in org.flag4j.arrays.backend declared as Shape
    Modifier and Type
    Field
    Description
    final Shape
    AbstractTensor.shape
    The shape of this tensor.
    Methods in org.flag4j.arrays.backend that return Shape
    Modifier and Type
    Method
    Description
    AbstractTensor.getShape()
    Gets the shape of this tensor.
    MatrixMixin.getShape()
    Gets the shape of this matrix.
    Methods in org.flag4j.arrays.backend with parameters of type Shape
    Modifier and Type
    Method
    Description
    abstract T
    AbstractTensor.makeLikeTensor(Shape shape, U entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    abstract T
    AbstractTensor.reshape(Shape newShape)
    Copies and reshapes this tensor.
    Constructors in org.flag4j.arrays.backend with parameters of type Shape
    Modifier
    Constructor
    Description
    protected
    AbstractTensor(Shape shape, U data)
    Creates a tensor with the specified data and shape.
  • Uses of Shape in org.flag4j.arrays.backend.field_arrays

    Methods in org.flag4j.arrays.backend.field_arrays with parameters of type Shape
    Modifier and Type
    Method
    Description
    AbstractCooFieldMatrix.makeLikeCsrMatrix(Shape shape, W[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.
    abstract AbstractCsrFieldMatrix<?,T,?,V>
    AbstractDenseFieldMatrix.makeLikeCsrMatrix(Shape shape, V[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix which is of a similar type as this dense matrix.
    Constructors in org.flag4j.arrays.backend.field_arrays with parameters of type Shape
    Modifier
    Constructor
    Description
    protected
    AbstractCooFieldMatrix(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
    AbstractCooFieldTensor(Shape shape, V[] entries, int[][] indices)
    Creates a tensor with the specified data and shape.
    protected
    AbstractCooFieldVector(Shape shape, Y[] data, int[] indices)
    Creates a tensor with the specified data and shape.
    protected
    AbstractCsrFieldMatrix(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
    Creates a tensor with the specified data and shape.
    protected
    AbstractDenseFieldTensor(Shape shape, V[] entries)
    Creates a tensor with the specified data and shape.
    protected
    AbstractDenseFieldVector(Shape shape, V[] entries)
    Creates a tensor with the specified data and shape.
  • Uses of Shape in org.flag4j.arrays.backend.primitive_arrays

    Methods in org.flag4j.arrays.backend.primitive_arrays with parameters of type Shape
    Modifier and Type
    Method
    Description
    AbstractDenseDoubleTensor.reshape(Shape newShape)
    Copies and reshapes this tensor.
    Constructors in org.flag4j.arrays.backend.primitive_arrays with parameters of type Shape
    Modifier
    Constructor
    Description
    protected
    AbstractDenseDoubleTensor(Shape shape, double[] entries)
    Creates a tensor with the specified data and shape.
    protected
    AbstractDoubleTensor(Shape shape, double[] entries)
    Creates a tensor with the specified data and shape.
  • Uses of Shape in org.flag4j.arrays.backend.ring_arrays

    Methods in org.flag4j.arrays.backend.ring_arrays with parameters of type Shape
    Modifier and Type
    Method
    Description
    AbstractCooRingMatrix.makeLikeCsrMatrix(Shape shape, W[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.
    abstract AbstractCooRingTensor<?,?,W>
    AbstractCooRingMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    Constructors in org.flag4j.arrays.backend.ring_arrays with parameters of type Shape
    Modifier
    Constructor
    Description
    protected
    AbstractCooRingMatrix(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
    AbstractCooRingTensor(Shape shape, V[] data, int[][] indices)
    Creates a tensor with the specified data and shape.
    protected
    AbstractCooRingVector(Shape shape, Y[] entries, int[] indices)
    Creates a COO vector with the specified data and shape.
    protected
    AbstractCsrRingMatrix(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
    Creates a tensor with the specified data and shape.
    protected
    Creates a tensor with the specified data and shape.
    protected
    Creates a tensor with the specified data and shape.
  • Uses of Shape in org.flag4j.arrays.backend.semiring_arrays

    Modifier and Type
    Method
    Description
    TensorOverSemiring.getShape()
    Gets the shape of this tensor.
    Methods in org.flag4j.arrays.backend.semiring_arrays with parameters of type Shape
    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, List<W> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and non-zero indices.
    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, List<V> data, List<int[]> indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    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, List<Y> entries, List<Integer> indices)
    Constructs a COO vector with the specified shape, non-zero data, and non-zero indices.
    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, List<W> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Constructs a CSR matrix with the specified shape, non-zero data, and non-zero 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.
    TensorOverSemiring.makeLikeTensor(Shape shape, V entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    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.
    AbstractCooSemiringMatrix.reshape(Shape newShape)
    Copies and reshapes this tensor.
    AbstractCooSemiringTensor.reshape(Shape newShape)
    Copies and reshapes this tensor.
    AbstractCooSemiringVector.reshape(Shape newShape)
    Copies and reshapes this tensor.
    AbstractCsrSemiringMatrix.reshape(Shape newShape)
    Copies and reshapes this tensor.
    AbstractDenseSemiringTensor.reshape(Shape newShape)
    Copies and reshapes this tensor.
    AbstractCooSemiringMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    abstract AbstractTensor<?,Y[],Y>
    AbstractCooSemiringVector.toTensor(Shape newShape)
    Converts this vector to an equivalent tensor with the specified shape.
    AbstractCsrSemiringMatrix.toTensor(Shape shape)
    Converts this CSR matrix to an equivalent COO tensor with the specified shape.
    AbstractDenseSemiringMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified newShape.
    Constructors in org.flag4j.arrays.backend.semiring_arrays with parameters of type Shape
    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 Shape in org.flag4j.arrays.dense

    Methods in org.flag4j.arrays.dense with parameters of type Shape
    Modifier and Type
    Method
    Description
    static CMatrix
    CMatrix.I(Shape shape)
    Constructs an identity-like matrix of the specified shape.
    static <T extends Field<T>>
    FieldMatrix<T>
    FieldMatrix.I(Shape shape, T fieldValue)
    Constructs an identity-like matrix of the specified shape.
    static Matrix
    Matrix.I(Shape shape)
    Constructs an identity-like matrix of the specified shape.
    static <T extends Ring<T>>
    RingMatrix<T>
    RingMatrix.I(Shape shape, T fieldValue)
    Constructs an identity-like matrix of the specified shape.
    static <T extends Semiring<T>>
    SemiringMatrix<T>
    SemiringMatrix.I(Shape shape, T fieldValue)
    Constructs an identity-like matrix of the specified shape.
    protected CooCMatrix
    CMatrix.makeLikeCooMatrix(Shape shape, Complex128[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix which is of a similar type as this dense matrix.
    FieldMatrix.makeLikeCooMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix of similar type to this dense matrix.
    protected CooRingMatrix<T>
    RingMatrix.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 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 CooCMatrix
    CMatrix.makeLikeCooTensor(Shape shape, Complex128[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooCTensor
    CTensor.makeLikeCooTensor(Shape shape, Complex128[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooCVector
    CVector.makeLikeCooTensor(Shape shape, Complex128[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooFieldMatrix<T>
    FieldMatrix.makeLikeCooTensor(Shape shape, T[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooFieldTensor<T>
    FieldTensor.makeLikeCooTensor(Shape shape, T[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooFieldVector<T>
    FieldVector.makeLikeCooTensor(Shape shape, T[] entries, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooRingTensor<T>
    RingMatrix.makeLikeCooTensor(Shape shape, T[] data, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooRingTensor<T>
    RingTensor.makeLikeCooTensor(Shape shape, T[] data, int[][] indices)
    Constructs a sparse COO tensor which is of a similar type as this dense tensor.
    protected CooRingVector<T>
    RingVector.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>
    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.
    CMatrix.makeLikeCsrMatrix(Shape shape, Complex128[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix which is of a similar type as this dense matrix.
    FieldMatrix.makeLikeCsrMatrix(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of similar type to this dense matrix.
    RingMatrix.makeLikeCsrMatrix(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix which is of a similar type as this dense matrix.
    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.
    CVector.makeLikeMatrix(Shape shape, Complex128[] entries)
    Constructs a matrix of similar type to this vector with the specified shape and data.
    FieldVector.makeLikeMatrix(Shape shape, T[] entries)
    Constructs a matrix of similar type to this vector with the specified shape and data.
    protected RingMatrix<T>
    RingVector.makeLikeMatrix(Shape shape, T[] entries)
    Constructs a matrix of similar type to this vector with the specified shape and data.
    protected SemiringMatrix<T>
    SemiringVector.makeLikeMatrix(Shape shape, T[] entries)
    Constructs a matrix of similar type to this vector with the specified shape and data.
    CMatrix.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CTensor.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CVector.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    FieldMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    FieldTensor.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    FieldVector.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    Matrix.makeLikeTensor(Shape shape, double[] data)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    RingMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    RingTensor.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    RingVector.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the 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.
    Tensor.makeLikeTensor(Shape shape, double[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    Vector.makeLikeTensor(Shape shape, double[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    protected CVector
    CMatrix.makeLikeVector(Shape shape, Complex128[] entries)
    Constructs a vector of a similar type as this matrix.
    protected FieldVector<T>
    FieldMatrix.makeLikeVector(Shape shape, T[] entries)
    Constructs a vector of a similar type as this matrix.
    protected RingVector<T>
    RingMatrix.makeLikeVector(Shape shape, T[] entries)
    Constructs a vector of a similar type as this matrix.
    protected SemiringVector<T>
    SemiringMatrix.makeLikeVector(Shape shape, T[] entries)
    Constructs a vector of a similar type as this matrix.
    FieldTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    RingTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    SemiringTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    Tensor.toMatrix(Shape shape)
    Converts this tensor to an equivalent matrix with the specified shape.
    CMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified newShape.
    FieldMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified newShape.
    RingMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified newShape.
    SemiringMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified newShape.
    Constructors in org.flag4j.arrays.dense with parameters of type Shape
    Modifier
    Constructor
    Description
     
    CMatrix(Shape shape)
    Creates a zero matrix with the specified shape.
     
    CMatrix(Shape shape, double[] entries)
    Constructs a complex matrix with specified shape and data.
     
    CMatrix(Shape shape, Double fillValue)
    Creates matrix with the specified shape filled with fillValue.
     
    CMatrix(Shape shape, Complex128 fillValue)
    Creates a complex matrix with the specified shape filled with fillValue.
     
    CMatrix(Shape shape, Complex128[] entries)
    Creates a complex matrix with the specified data and shape.
     
    CTensor(Shape shape)
    Creates a zero tensor with the specified shape.
     
    CTensor(Shape shape, double fillValue)
    Creates a tensor with the specified shape and filled with fillValue.
     
    CTensor(Shape shape, double[] entries)
    Creates a tensor with the specified data and shape.
     
    CTensor(Shape shape, String fillValue)
    Creates a tensor with the specified shape and filled with fillValue.
     
    CTensor(Shape shape, String[] entries)
    Creates a tensor with the specified data and shape.
     
    CTensor(Shape shape, Complex128 fillValue)
    Creates a tensor with the specified shape and filled with fillValue.
     
    CTensor(Shape shape, Complex128[] entries)
    Creates a tensor with the specified data and shape.
     
    CTensor(Shape shape, Complex64 fillValue)
    Creates a tensor with the specified shape and filled with fillValue.
     
    CTensor(Shape shape, Complex64[] entries)
    Creates a tensor with the specified data and shape.
     
    CVector(Shape shape)
    Constructs a zero vector with the specified shape.
     
    CVector(Shape shape, Complex128[] data)
    Constructs a dense complex vector with the given shape and entries.
     
    FieldMatrix(Shape shape, T fillValue)
    Creates a dense field matrix with the specified data and filled with filledValue.
     
    FieldMatrix(Shape shape, T[] entries)
    Creates a dense field matrix with the specified data and shape.
     
    FieldTensor(Shape shape, T fillValue)
    Creates a tensor with the specified shape filled with fillValue.
     
    FieldTensor(Shape shape, T[] entries)
    Creates a tensor with the specified data and shape.
     
    FieldVector(Shape shape, T[] entries)
    Constructs a dense complex vector with the given shape and entries.
     
    Matrix(Shape shape)
    Creates a real dense matrix with specified shape filled with zeros.
     
    Matrix(Shape shape, double value)
    Creates a real dense matrix with specified shape filled with a specific value.
     
    Matrix(Shape shape, double... entries)
    Creates a tensor with the specified data and shape.
     
    RingMatrix(Shape shape, T fillValue)
    Creates a dense ring matrix with the specified data and filled with filledValue.
     
    RingMatrix(Shape shape, T[] entries)
    Creates a tensor with the specified data and shape.
     
    RingTensor(Shape shape, T fillValue)
    Creates a dense ring tensor with the specified data and filled with filledValue.
     
    RingTensor(Shape shape, T[] data)
    Creates a tensor with the specified data and shape.
     
    RingVector(Shape shape, T[] data)
    Creates a ring vector with the specified data and shape.
     
    SemiringMatrix(Shape shape, T fillValue)
    Creates a dense semiring matrix with the specified data and filled with filledValue.
     
    SemiringMatrix(Shape shape, T[] entries)
    Creates a tensor with the specified data and shape.
     
    SemiringTensor(Shape shape, T fillValue)
    Creates a dense semiring tensor with the specified data and filled with filledValue.
     
    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.
     
    Tensor(Shape shape)
    Creates a zero tensor with the shape.
     
    Tensor(Shape shape, double fillValue)
    Creates a tensor with the specified shape filled with fillValue.
     
    Tensor(Shape shape, double... entries)
    Creates a tensor with the specified data and shape.
     
    Tensor(Shape shape, int... entries)
    Creates a tensor with the specified data and shape.
     
    Tensor(Shape shape, Double[] entries)
    Creates a tensor with the specified data and shape.
     
    Tensor(Shape shape, Integer[] entries)
    Creates a tensor with the specified data and shape.
     
    Vector(Shape shape)
    Creates a vector of the specified shape filled with zeros.
     
    Vector(Shape shape, double fillValue)
    Creates a vector of specified size filled with a specified value.
     
    Vector(Shape shape, double[] entries)
    Creates a tensor with the specified data and shape.
  • Uses of Shape in org.flag4j.arrays.sparse

    Fields in org.flag4j.arrays.sparse declared as Shape
    Modifier and Type
    Field
    Description
    final Shape
    PermutationMatrix.shape
    Shape of this permutation matrix.
    Methods in org.flag4j.arrays.sparse that return Shape
    Modifier and Type
    Method
    Description
    SymmTriDiag.getShape()
    Gets the shape of this symmetric tri-diagonal matrix.
    Methods in org.flag4j.arrays.sparse with parameters of type Shape
    Modifier and Type
    Method
    Description
    CooTensor.makeDenseTensor(Shape shape, double[] entries)
    Makes a dense tensor with the specified shape and data which is a similar type to this sparse tensor.
    CsrCMatrix.makeLikeCooMatrix(Shape shape, Complex128[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.
    CsrFieldMatrix.makeLikeCooMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.
    CsrRingMatrix.makeLikeCooMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.
    CsrSemiringMatrix.makeLikeCooMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.
    CooCMatrix.makeLikeCsrMatrix(Shape shape, Complex128[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.
    CooFieldMatrix.makeLikeCsrMatrix(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.
    CooRingMatrix.makeLikeCsrMatrix(Shape shape, T[] entries, int[] rowPointers, int[] colIndices)
    Constructs a sparse CSR matrix of a similar type to this sparse COO 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.
    CooCVector.makeLikeDenseMatrix(Shape shape, Complex128... entries)
    Constructs a dense matrix of a similar type as this vector with the specified shape and data.
    CooFieldVector.makeLikeDenseMatrix(Shape shape, T... entries)
    Constructs a dense matrix of a similar type as this vector with the specified shape and data.
    CooRingVector.makeLikeDenseMatrix(Shape shape, T... entries)
    Constructs a dense matrix of a similar type as this vector with the specified shape and data.
    CooSemiringVector.makeLikeDenseMatrix(Shape shape, T... entries)
    Constructs a dense matrix of a similar type as this vector with the specified shape and data.
    CooCMatrix.makeLikeDenseTensor(Shape shape, Complex128[] entries)
    Constructs a dense tensor with the specified shape and data which is a similar type to this sparse tensor.
    CooCTensor.makeLikeDenseTensor(Shape shape, Complex128[] entries)
    Constructs a dense tensor that is a similar type as this sparse COO tensor.
    CooCVector.makeLikeDenseTensor(Shape shape, Complex128... entries)
    Constructs a dense vector of a similar type as this vector with the specified shape and data.
    CooFieldMatrix.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense tensor with the specified shape and data which is a similar type to this sparse tensor.
    CooFieldTensor.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense tensor that is a similar type as this sparse COO tensor.
    CooFieldVector.makeLikeDenseTensor(Shape shape, T... entries)
    Constructs a dense vector of a similar type as this vector with the specified shape and data.
    CooRingMatrix.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense tensor with the specified shape and data which is a similar type to this sparse tensor.
    CooRingTensor.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense tensor that is a similar type as this sparse COO tensor.
    CooRingVector.makeLikeDenseTensor(Shape shape, T... entries)
    Constructs a dense vector 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.
    CsrCMatrix.makeLikeDenseTensor(Shape shape, Complex128[] entries)
    Constructs a dense matrix which is of a similar type to this sparse CSR matrix.
    CsrFieldMatrix.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense matrix which is of a similar type to this sparse CSR matrix.
    CsrRingMatrix.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense matrix which is of a similar type to this sparse CSR matrix.
    CsrSemiringMatrix.makeLikeDenseTensor(Shape shape, T[] entries)
    Constructs a dense matrix which is of a similar type to this sparse CSR matrix.
    CooCVector.makeLikeMatrix(Shape shape, Complex128[] entries, int[] rowIndices, int[] colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and row and column indices.
    CooFieldVector.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.
    CooRingVector.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.
    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.
    CooCMatrix.makeLikeTensor(Shape shape, List<Complex128> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and non-zero indices.
    CooCMatrix.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooCMatrix.makeLikeTensor(Shape shape, Complex128[] 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.
    CooCTensor.makeLikeTensor(Shape shape, List<Complex128> entries, List<int[]> indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    CooCTensor.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooCTensor.makeLikeTensor(Shape shape, Complex128[] entries, int[][] indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    CooCVector.makeLikeTensor(Shape shape, List<Complex128> entries, List<Integer> indices)
    Constructs a COO vector with the specified shape, non-zero data, and non-zero indices.
    CooCVector.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooCVector.makeLikeTensor(Shape shape, Complex128[] entries, int[] indices)
    Constructs a sparse COO vector of the same type as this vector with the specified non-zero data and indices.
    CooFieldMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and non-zero indices.
    CooFieldMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooFieldMatrix.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.
    CooFieldTensor.makeLikeTensor(Shape shape, List<T> entries, List<int[]> indices)
    Constructs a sparse tensor of the same type as this tensor with the given the shape, non-zero data, and non-zero indices.
    CooFieldTensor.makeLikeTensor(Shape shape, T[] entries)
    Constructs a sparse tensor of the same type as this tensor with the same indices as this sparse tensor and with the provided the shape and data.
    CooFieldTensor.makeLikeTensor(Shape shape, T[] entries, int[][] indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    CooFieldVector.makeLikeTensor(Shape shape, List<T> entries, List<Integer> indices)
    Constructs a COO vector with the specified shape, non-zero data, and non-zero indices.
    CooFieldVector.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooFieldVector.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.
    CooMatrix.makeLikeTensor(Shape shape, double[] entries)
    Constructs a sparse COO matrix of the same type as this tensor with the given the shape and data and indices copied from this matrix.
    CooRingMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and non-zero indices.
    CooRingMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooRingMatrix.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.
    CooRingTensor.makeLikeTensor(Shape shape, List<T> data, List<int[]> indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    CooRingTensor.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooRingTensor.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.
    CooRingVector.makeLikeTensor(Shape shape, List<T> entries, List<Integer> indices)
    Constructs a COO vector with the specified shape, non-zero data, and non-zero indices.
    CooRingVector.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CooRingVector.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.
    CooSemiringMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Constructs a COO matrix with the specified shape, non-zero data, and non-zero 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, List<T> data, List<int[]> indices)
    Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.
    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, List<T> entries, List<Integer> indices)
    Constructs a COO vector with the specified shape, non-zero data, and non-zero indices.
    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.
    CooTensor.makeLikeTensor(Shape shape, double[] entries)
    Constructs a sparse tensor of the same type as this tensor with the same indices as this sparse tensor and with the provided the shape and data.
    CooTensor.makeLikeTensor(Shape shape, double[] entries, int[][] indices)
    Constructs a sparse tensor of the same type as this tensor with the given the shape, non-zero data, and non-zero indices.
    CooTensor.makeLikeTensor(Shape shape, List<Double> entries, List<int[]> indices)
    Constructs a sparse tensor of the same type as this tensor with the given the shape, non-zero data, and non-zero indices.
    CooVector.makeLikeTensor(Shape shape, double[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CsrCMatrix.makeLikeTensor(Shape shape, List<Complex128> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Constructs a CSR matrix with the specified shape, non-zero data, and non-zero indices.
    CsrCMatrix.makeLikeTensor(Shape shape, Complex128[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CsrCMatrix.makeLikeTensor(Shape shape, Complex128[] 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.
    CsrFieldMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Constructs a CSR matrix with the specified shape, non-zero data, and non-zero indices.
    CsrFieldMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CsrFieldMatrix.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.
    CsrMatrix.makeLikeTensor(Shape shape, double[] entries)
    Constructs a CSR matrix of the same type as this matrix with the given the shape and data and the same row pointers and column indices as this matrix.
    CsrRingMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Constructs a CSR matrix with the specified shape, non-zero data, and non-zero indices.
    CsrRingMatrix.makeLikeTensor(Shape shape, T[] entries)
    Constructs a tensor of the same type as this tensor with the given the shape and data.
    CsrRingMatrix.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.
    CsrSemiringMatrix.makeLikeTensor(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Constructs a CSR matrix with the specified shape, non-zero data, and non-zero 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.
    CooCMatrix.makeLikeVector(Shape shape, Complex128[] entries, int[] indices)
    Constructs a sparse COO vector of a similar type to this COO matrix.
    CooFieldMatrix.makeLikeVector(Shape shape, T[] entries, int[] indices)
    Constructs a sparse COO vector of a similar type to this COO matrix.
    CooRingMatrix.makeLikeVector(Shape shape, T[] entries, int[] indices)
    Constructs a sparse COO vector of a similar type to this COO matrix.
    CooSemiringMatrix.makeLikeVector(Shape shape, T[] entries, int[] indices)
    Constructs a sparse COO vector of a similar type to this COO matrix.
    CooMatrix.reshape(Shape newShape)
    Copies and reshapes this tensor.
    CooTensor.reshape(Shape newShape)
    Copies and reshapes this tensor.
    CooVector.reshape(Shape newShape)
    Copies and reshapes this tensor.
    CsrMatrix.reshape(Shape newShape)
    Copies and reshapes this tensor.
    CooCTensor.toMatrix(Shape newShape)
    Converts this tensor to a matrix with specified shape.
    CooFieldTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    CooRingTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    CooSemiringTensor.toMatrix(Shape matShape)
    Converts this tensor to a matrix with the specified shape.
    CooCMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    CooCVector.toTensor(Shape newShape)
    Converts this vector to an equivalent tensor with the specified shape.
    CooFieldMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    CooFieldVector.toTensor(Shape newShape)
    Converts this vector to an equivalent tensor with the specified shape.
    CooRingMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    CooRingVector.toTensor(Shape newShape)
    Converts this vector to an equivalent tensor with the specified shape.
    CooSemiringMatrix.toTensor(Shape newShape)
    Converts this matrix to an equivalent tensor with the specified shape.
    CooSemiringVector.toTensor(Shape newShape)
    Converts this vector to an equivalent tensor with the specified shape.
    CsrCMatrix.toTensor(Shape shape)
    Converts this CSR matrix to an equivalent COO tensor with the specified shape.
    CsrFieldMatrix.toTensor(Shape shape)
    Converts this CSR matrix to an equivalent COO tensor with the specified shape.
    CsrRingMatrix.toTensor(Shape shape)
    Converts this CSR matrix to an equivalent COO tensor with the specified shape.
    CsrSemiringMatrix.toTensor(Shape shape)
    Converts this CSR matrix to an equivalent COO tensor with the specified shape.
    Constructors in org.flag4j.arrays.sparse with parameters of type Shape
    Modifier
    Constructor
    Description
     
    Constructs a zero matrix of the specified shape.
     
    CooCMatrix(Shape shape, double[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooCMatrix(Shape shape, List<Complex128> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooCMatrix(Shape shape, Complex128[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    Creates a tensor with the specified data and shape.
     
    CooCTensor(Shape shape, double[] entries, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooCTensor(Shape shape, List<Complex128> entries, List<int[]> indices)
    Creates a tensor with the specified data and shape.
     
    CooCTensor(Shape shape, Complex128[] entries, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooCTensor(Shape shape, Complex64[] entries, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooCVector(Shape shape, List<Complex128> entries, List<Integer> indices)
    Constructs a complex COO vector with the specified size, non-zero data, and non-zero indices.
     
    CooCVector(Shape shape, Complex128[] entries, int[] indices)
    Creates a tensor with the specified data and shape.
     
    CooFieldMatrix(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooFieldMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooFieldTensor(Shape shape, List<T> entries, List<int[]> indices)
    Creates a tensor with the specified data and shape.
     
    CooFieldTensor(Shape shape, T[] entries, int[][] indices)
    creates a tensor with the specified data and shape.
     
    CooFieldVector(Shape shape, T[] entries, int[] indices)
    Creates sparse COO vector with the specified size, non-zero data, and non-zero indices.
     
    Constructs a zero matrix with the specified shape.
     
    CooMatrix(Shape shape, double[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooMatrix(Shape shape, int[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooMatrix(Shape shape, List<Double> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooRingMatrix(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooRingMatrix(Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.
     
    CooRingTensor(Shape shape, List<T> data, List<int[]> indices)
    Creates a tensor with the specified data and shape.
     
    CooRingTensor(Shape shape, T[] data, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooRingVector(Shape shape, List<T> entries, List<Integer> indices)
    Creates sparse COO vector with the specified size, non-zero data, and non-zero indices.
     
    CooRingVector(Shape shape, T[] entries, int[] indices)
    Creates a tensor with the specified data and shape.
     
    CooSemiringMatrix(Shape shape, List<T> entries, List<Integer> rowIndices, List<Integer> 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, List<T> data, List<int[]> indices)
    Creates a tensor with the specified data and shape.
     
    CooSemiringTensor(Shape shape, T[] data, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooSemiringVector(Shape shape, List<T> entries, List<Integer> indices)
    Creates sparse COO vector with the specified size, non-zero data, and non-zero indices.
     
    CooSemiringVector(Shape shape, T[] entries, int[] indices)
    Creates a tensor with the specified data and shape.
     
    Creates a zero matrix with the specified shape.
     
    CooTensor(Shape shape, double[] entries, int[][] indices)
    Creates a tensor with the specified data and shape.
     
    CooTensor(Shape shape, int[] entries, int[][] indices)
    Creates a sparse COO matrix with the specified shape, non-zero data, and indices.
     
    CooTensor(Shape shape, List<Double> entries, List<int[]> indices)
    Creates a tensor with the specified data and shape.
     
    CooVector(Shape shape, double[] entries, int[] indices)
    Creates sparse COO vector with the specified size, non-zero data, and non-zero indices.
     
    CooVector(Shape shape, List<Double> data, List<Integer> indices)
    Creates sparse COO vector with the specified size, non-zero data, and non-zero indices.
     
    Constructs a zero matrix of the specified shape.
     
    CsrCMatrix(Shape shape, List<Complex128> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Creates a complex sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrCMatrix(Shape shape, Complex128[] entries, int[] rowPointers, int[] colIndices)
    Creates a complex sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrFieldMatrix(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Creates a sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrFieldMatrix(Shape shape, T fieldElement)
    Constructs a sparse CSR matrix representing the zero matrix for the field which fieldElement belongs to.
     
    CsrFieldMatrix(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.
     
    Constructs zero matrix with the specified shape.
     
    CsrMatrix(Shape shape, double[] entries, int[] rowPointers, int[] colIndices)
    Creates a sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrRingMatrix(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Creates a sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrRingMatrix(Shape shape, T ringElement)
    Constructs a sparse CSR matrix representing the zero matrix for the field which ringElement belongs to.
     
    CsrRingMatrix(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.
     
    CsrSemiringMatrix(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices)
    Creates a sparse CSR matrix with the specified shape, non-zero data, row pointers, and non-zero column indices.
     
    CsrSemiringMatrix(Shape shape, T semiringElement)
    Constructs a sparse CSR matrix representing the zero matrix for the field which semiringElement belongs to.
     
    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.
     
    Creates a permutation matrix which is equivalent to the identity matrix of the specified size.
  • Uses of Shape in org.flag4j.concurrency

    Methods in org.flag4j.concurrency with parameters of type Shape
    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 Shape in org.flag4j.io

    Methods in org.flag4j.io with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T> String
    PrettyPrint.matrixToString(Shape shape, double[] data)
    Converts a matrix into a "pretty" string using parameters set in the PrintOptions class.
    static <T> String
    PrettyPrint.matrixToString(Shape shape, T[] data)
    Converts a matrix into a "pretty" string using parameters set in the PrintOptions class.
  • Uses of Shape in org.flag4j.linalg.decompositions.svd

    Methods in org.flag4j.linalg.decompositions.svd with parameters of type Shape
    Modifier and Type
    Method
    Description
    protected void
    ComplexSVD.initUV(Shape src, int cols)
    Initializes the unitary U and V matrices for the SVD.
    protected void
    RealSVD.initUV(Shape src, int cols)
    Initializes the unitary U and V matrices for the SVD.
    protected abstract void
    SVD.initUV(Shape src, int cols)
    Initializes the unitary U and V matrices for the SVD.
  • Uses of Shape in org.flag4j.linalg.ops

    Fields in org.flag4j.linalg.ops declared as Shape
    Modifier and Type
    Field
    Description
    protected Shape
    TensorDot.destShape
     
    protected Shape
    TensorDot.newShape1
     
    protected Shape
    TensorDot.newShape2
     
    protected Shape
    TensorDot.shape1
     
    protected Shape
    TensorDot.shape2
     
    Methods in org.flag4j.linalg.ops that return Shape
    Modifier and Type
    Method
    Description
    TensorDot.getOutputShape()
    Gets the shape of the tensor resulting from this tensor dot product as specified in the constructor.
    Methods in org.flag4j.linalg.ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    double[]
    RealDenseTensorBinaryOperation.apply(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Applies the specified binary operation on the two tensors.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmComplex(Shape shape1, Shape shape2)
    Dynamically chooses matrix multiply algorithm based on the shapes of the two matrices to multiply.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmComplexTranspose(Shape shape)
    Dynamically chooses the matrix multiplication-transpose algorithm to used based on the shape of the first matrix.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmComplexVector(Shape shape)
    Dynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmRealComplex(Shape shape1, Shape shape2)
    Dynamically chooses matrix multiply algorithm based on the shapes of the two matrices to multiply.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmRealComplexTranspose(Shape shape)
    Dynamically chooses the matrix multiplication-transpose algorithm to used based on the shape of the first matrix.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmRealComplexVector(Shape shape)
    Dynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.
    static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName
    MatrixMultiplyDispatcher.chooseAlgorithmRealVector(Shape shape)
    Dynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.
    static <T extends Field<T>>
    T[]
    MatrixMultiplyDispatcher.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.
    static double[]
    RealDenseMatrixMultiplyDispatcher.dispatch(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.
    static double[]
    TransposeDispatcher.dispatch(double[] src, Shape shape)
    Dispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.
    static Object[]
    TransposeDispatcher.dispatch(Object[] src, Shape shape, Object[] dest)
    Dispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.
    static <T extends Ring<T>>
    void
    TransposeDispatcher.dispatchHermitian(T[] src, Shape shape, T[] dest)
    Dispatches a matrix Hermitian transpose (i.e. conjugate transpose) problem to the appropriate algorithm based on its shape and size.
    static double[]
    TransposeDispatcher.dispatchTensor(double[] src, Shape shape, int[] axes)
    Dispatches a tensor transpose problem to the appropriate algorithm based on its shape and size.
    static Object[]
    TransposeDispatcher.dispatchTensor(Object[] src, Shape shape, int[] axes, Object[] dest)
    Dispatches a tensor transpose problem to the appropriate algorithm based on its shape and size.
    static <T> T[]
    TransposeDispatcher.dispatchTensor(T[] src, Shape srcShape, int axis1, int axis2, T[] dest)
    Dispatches a tensor transpose problem to the appropriate algorithm based on its shape and size.
    static <V extends Ring<V>>
    void
    TransposeDispatcher.dispatchTensorHermitian(Shape shape, V[] src, int[] axes, V[] dest)
    Dispatches a tensor Hermitian transpose problem to the appropriate algorithm based on its shape and size.
    static <V extends Ring<V>>
    void
    TransposeDispatcher.dispatchTensorHermitian(Shape shape, V[] src, int axis1, int axis2, V[] dest)
    Dispatches a tensor Hermitian transpose problem to the appropriate algorithm based on its shape and size.
    Constructors in org.flag4j.linalg.ops with parameters of type Shape
    Modifier
    Constructor
    Description
    protected
    TensorDot(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 Shape in org.flag4j.linalg.ops.dense

    Methods in org.flag4j.linalg.ops.dense with parameters of type Shape
    Modifier and Type
    Method
    Description
    static double[]
    DenseTranspose.standard(double[] src, Shape shape, int[] axes, double[] dest)
    Computes the transpose of a tensor.
    static <T> Object[]
    DenseTranspose.standard(Object[] src, Shape shape, int[] axes, Object[] dest)
    Computes the transpose of a tensor.
    static Object[]
    DenseTranspose.standard(Object[] src, Shape shape, int axis1, int axis2, Object[] dest)
    Transposes tensor along specified axes using a standard transpose algorithm.
    static <T> Object[]
    DenseTranspose.standardConcurrent(Object[] src, Shape shape, int[] axes, Object[] dest)
    Computes the transpose of a tensor using a concurrent implementation.
    static <T> Object[]
    DenseTranspose.standardConcurrent(Object[] src, Shape shape, int axis1, int axis2, Object[] dest)
    Transposes tensor along specified axes using a standard concurrent transpose algorithm.
    static <T> void
    DenseOps.swapCols(Shape shape, T[] data, int colIdx1, int colIdx2)
    Swaps specified columns in the matrix.
    static <T> void
    DenseOps.swapColsUnsafe(Shape shape, T[] data, int colIdx1, int colIdx2, int start, int stop)
    Swaps two columns, over a specified range of rows, within a matrix.
    static <T> void
    DenseOps.swapRows(Shape shape, T[] data, int rowIdx1, int rowIdx2)
    Swaps specified rows in the matrix.
    static <T> void
    DenseOps.swapRowsUnsafe(Shape shape, T[] data, int rowIdx1, int rowIdx2, int start, int stop)
    Swaps two rows, over a specified range of columns, within a matrix.
    static <T> boolean
    DenseEquals.tensorEquals(T[] src1, Shape shape1, T[] src2, Shape shape2)
    Checks if two dense tensors are equal.
    Constructors in org.flag4j.linalg.ops.dense with parameters of type Shape
    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 Shape in org.flag4j.linalg.ops.dense_sparse.coo.field_ops

    Methods in org.flag4j.linalg.ops.dense_sparse.coo.field_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.blockedVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.concurrentBlockedVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.concurrentStandard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.concurrentStandard(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.concurrentStandardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.concurrentStandardVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatrixOps.elemMult(Shape shape1, T[] data1, Shape shape2, T[] data2, int[] rowIndices2, int[] colIndices2, T[] dest)
    Computes the element-wise multiplication between a real dense matrix and a real sparse matrix.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.standard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a sparse COO matrix and a dense matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.standard(T[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a dense matrix and a sparse COO matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.standardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a standard algorithm.
    static <T extends Field<T>>
    void
    DenseCooFieldMatMult.standardVector(T[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a standard algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.dense_sparse.coo.real

    Methods in org.flag4j.linalg.ops.dense_sparse.coo.real with parameters of type Shape
    Modifier and Type
    Method
    Description
    static double[]
    RealDenseSparseMatMult.blockedVector(double[] src1, Shape shape1, double[] src2, int[] indices)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static double[]
    RealDenseSparseMatMult.concurrentBlockedVector(double[] src1, Shape shape1, double[] src2, int[] indices)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static double[]
    RealDenseSparseMatMult.concurrentStandard(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a concurrent standard algorithm.
    static double[]
    RealDenseSparseMatMult.concurrentStandard(double[] src1, Shape shape1, double[] src2, int[] rowIndices, int[] colIndices, Shape shape2)
    Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a concurrent standard algorithm.
    static double[]
    RealDenseSparseMatMult.concurrentStandardVector(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2)
    Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.
    static double[]
    RealDenseSparseMatMult.concurrentStandardVector(double[] src1, Shape shape1, double[] src2, int[] indices)
    Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.
    static double[]
    RealDenseSparseMatrixMultTranspose.multTranspose(double[] dSrc, Shape dShape, double[] spSrc, int[] rowIndices, int[] colIndices, Shape spShape)
    Multiplies a real dense matrix to the transpose of a real sparse matrix.
    static double[]
    RealDenseSparseMatMult.standard(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication between a real sparse matrix and a real dense matrix using a standard algorithm.
    static double[]
    RealDenseSparseMatMult.standard(double[] src1, Shape shape1, double[] src2, int[] rowIndices, int[] colIndices, Shape shape2)
    Computes the matrix multiplication between a real dense matrix and a real sparse matrix using a standard algorithm.
    static double[]
    RealDenseSparseMatMult.standardVector(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2)
    Computes the sparse matrix dense vector multiplication using a standard algorithm.
    static double[]
    RealDenseSparseMatMult.standardVector(double[] src1, Shape shape1, double[] src2, int[] indices)
    Computes the dense matrix sparse vector multiplication using a standard algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.dense_sparse.coo.real_complex

    Modifier and Type
    Method
    Description
    static void
    RealComplexDenseCooOps.add(Shape shape1, double[] src1, Shape shape2, Complex128[] src2, int[][] indices, Complex128[] dest)
    Computes element-wise sum between a real dense tensor to a sparse COO complex tensor.
  • Uses of Shape in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops

    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.blockedVector(double[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.blockedVector(T[] src1, Shape shape1, double[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentBlockedVector(double[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentBlockedVector(T[] src1, Shape shape1, double[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandard(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real sparse matrix and a dense field matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandard(double[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix and a sparse field matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real sparse matrix and a dense field matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandard(T[] src1, Shape shape1, double[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix and a sparse field matrix using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandardVector(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandardVector(double[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.concurrentStandardVector(T[] src1, Shape shape1, double[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a concurrent standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMultTranspose.multTranspose(double[] deSrc, Shape deShape, T[] spSrc, int[] rowIndices, int[] colIndices, Shape spShape, T[] dest)
    Multiplies a real dense matrix to the transpose of a sparse field matrix.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMultTranspose.multTranspose(T[] dSrc, Shape dShape, double[] spSrc, int[] rowIndices, int[] colIndices, Shape spShape, T[] dest)
    Multiplies a dense field matrix to the transpose of a real sparse matrix.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standard(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real sparse matrix and a dense field matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standard(double[] src1, Shape shape1, T[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix and a sparse field matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standard(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real sparse matrix and a dense field matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standard(T[] src1, Shape shape1, double[] src2, int[] rowIndices, int[] colIndices, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix and a sparse field matrix using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standardVector(double[] src1, int[] rowIndices, int[] colIndices, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standardVector(double[] src1, Shape shape1, T[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standardVector(T[] src1, int[] rowIndices, int[] colIndices, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the sparse matrix dense vector multiplication using a standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseCooMatMult.standardVector(T[] src1, Shape shape1, double[] src2, int[] indices, T[] dest)
    Computes the dense matrix sparse vector multiplication using a standard algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.dense.field_ops

    Methods in org.flag4j.linalg.ops.dense.field_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    DenseFieldElemDiv.dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Dynamically chooses and applies element-wise division algorithm to use based on the number of data in the tensors.
    static <T extends Field<T>>
    void
    DenseFieldOps.div(Shape shape1, T[] src1, Shape shape2, T[] src2, T[] dest)
    Computes the element-wise division between two tensors.
    static <T extends Field<T>>
    void
    DenseFieldElemDiv.elemDiv(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors.
    static <T extends Field<T>>
    void
    DenseFieldElemDiv.elemDivConcurrent(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors using a concurrent algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.dense.real

    Methods in org.flag4j.linalg.ops.dense.real with parameters of type Shape
    Modifier and Type
    Method
    Description
    static void
    RealDenseOps.addEq(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes element-wise addition between tensors and stores the result in the first tensor.
    static double[]
    RealDenseMatMult.blocked(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a blocked algorithm.
    static double[]
    RealDenseMatMult.blockedReordered(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a blocked algorithm with the j-k loops swapped.
    static double[]
    RealDenseMatMult.blockedVector(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the multiplication of a real dense matrix with a real dense vector using a blocked algorithm.
    static double[]
    RealDenseMatMult.concurrentBlocked(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a concurrent implementation of a blocked algorithm.
    static double[]
    RealDenseMatMult.concurrentBlockedReordered(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.
    static double[]
    RealDenseMatMult.concurrentBlockedVector(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the multiplication of a real dense matrix with a real dense vector using a concurrent implementation of a blocked algorithm.
    static double[]
    RealDenseMatMult.concurrentReordered(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.
    static double[]
    RealDenseMatMult.concurrentStandard(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication of two real dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.
    static double[]
    RealDenseMatMult.concurrentStandardVector(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the multiplication of a real dense matrix with a real dense vector using a concurrent implementation of the standard matrix multiplication algorithm.
    static boolean
    RealDenseProperties.isAntiSymmetric(double[] src, Shape shape)
    Checks if a real dense matrix is anti-symmetric.
    static boolean
    RealDenseProperties.isSymmetric(double[] src, Shape shape)
    Checks if a real dense matrix is symmetric.
    static double[]
    RealDenseMatMultTranspose.multTranspose(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Multiplies a matrix to the transpose of a second matrix.
    static double[]
    RealDenseMatMultTranspose.multTransposeBlocked(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Multiplies a matrix to the transpose of a second matrix using a blocked algorithm.
    static double[]
    RealDenseMatMultTranspose.multTransposeBlockedConcurrent(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Multiplies a matrix to the transpose of a second matrix using a concurrent implementation of a blocked algorithm.
    static double[]
    RealDenseMatMultTranspose.multTransposeConcurrent(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Multiplies a matrix to the transpose of a second matrix using a concurrent algorithm.
    static double[]
    RealDenseMatMult.reordered(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication between two real dense matrices using the standard algorithm with j-k loops swapped.
    static void
    RealDenseSetOps.set(double[] src, Shape shape, double value, int... indices)
    Sets an element of a tensor to the specified value.
    static double[]
    RealDenseMatMult.standard(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the matrix multiplication between two real dense matrices using the standard algorithm.
    static double[]
    RealDenseTranspose.standard(double[] src, Shape shape, int[] axes)
    Computes the transpose of a tensor.
    static double[]
    RealDenseTranspose.standard(double[] src, Shape shape, int axis1, int axis2)
    Transposes tensor along specified axes using a standard transpose algorithm.
    static double[]
    RealDenseTranspose.standardConcurrent(double[] src, Shape shape, int[] axes)
    Computes the transpose of a tensor using a concurrent implementation.
    static double[]
    RealDenseTranspose.standardConcurrent(double[] src, Shape shape, int axis1, int axis2)
    Transposes tensor along specified axes using a standard concurrent transpose algorithm.
    static double[]
    RealDenseMatMult.standardVector(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes the multiplication of a real dense matrix with a real dense vector using the standard algorithm.
    static void
    RealDenseOps.subEq(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Computes element-wise subtraction between tensors and stores the result in the first tensor.
    static void
    RealDenseOps.swapColsUnsafe(Shape shape, double[] data, int colIdx1, int colIdx2, int start, int stop)
    Swaps two columns, over a specified range of rows, within a matrix.
    static void
    RealDenseOps.swapRowsUnsafe(Shape shape, double[] data, int rowIdx1, int rowIdx2, int start, int stop)
    Swaps two rows, over a specified range of columns, within a matrix.
    static boolean
    RealDenseEquals.tensorEquals(double[] src1, Shape shape1, double[] src2, Shape shape2)
    Checks if two dense tensors are equal.
    static void
    RealDenseOps.tensorTr(Shape shape, double[] src, int axis1, int axis2, Shape destShape, double[] dest)
    Computes the generalized trace of this tensor along the specified axes.
    Constructors in org.flag4j.linalg.ops.dense.real with parameters of type Shape
    Modifier
    Constructor
    Description
     
    RealDenseTensorDot(Shape shape1, double[] src1, Shape shape2, double[] 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 Shape in org.flag4j.linalg.ops.dense.real_field_ops

    Methods in org.flag4j.linalg.ops.dense.real_field_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    RealFieldDenseOps.add(Shape shape1, T[] src1, Shape shape2, double[] src2, T[] dest)
    Computes the element-wise addition of two tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.blockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentBlockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentStandard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentStandard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentStandardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.concurrentStandardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.dispatch(Shape shape1, double[] src1, Shape shape2, T[] src2, T[] dest)
    Dynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.dispatch(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Dynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.
    static <T extends Field<T>>
    void
    RealFieldDenseElemMult.dispatch(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Dynamically chooses and applies element-wise multiplication algorithm to use based on the number of data in the tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.elemDiv(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.elemDiv(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseOps.elemDiv(Shape shape1, double[] src1, Shape shape2, T[] src2, T[] dest)
    Computes the element-wise division between two dense tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseOps.elemDiv(Shape shape1, T[] src1, Shape shape2, double[] src2, T[] dest)
    Computes the element-wise division between two dense tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.elemDivConcurrent(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors using a concurrent algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseElemDiv.elemDivConcurrent(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the element-wise division of two tensors using a concurrent algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseElemMult.elemMult(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the element-wise multiplication of two tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseOps.elemMult(Shape shape1, T[] src1, Shape shape2, double[] src2, T[] dest)
    Computes the element-wise multiplication between two dense tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseElemMult.elemMultConcurrent(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the element-wise multiplication of two tensors using a concurrent algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTranspose(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Multiplies a matrix to the transpose of a second matrix.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTranspose(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Multiplies a matrix to the transpose of a second matrix.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeBlocked(double[] 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 Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeBlocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Multiplies a matrix to the transpose of a second matrix using a blocked algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeBlockedConcurrent(double[] 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 Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeBlockedConcurrent(T[] src1, Shape shape1, double[] 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 Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeConcurrent(double[] 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 Field<T>>
    void
    RealFieldDenseMatMultTranspose.multTransposeConcurrent(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Multiplies a matrix to the transpose of a second matrix using a concurrent algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.reordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.reordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.standard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.standard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.standardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using the standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseMatMult.standardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using the standard algorithm.
    static <T extends Field<T>>
    void
    RealFieldDenseOps.sub(Shape shape1, double[] src1, Shape shape2, T[] src2, T[] dest)
    Computes the element-wise subtraction of two tensors.
    static <T extends Field<T>>
    void
    RealFieldDenseOps.sub(Shape shape1, T[] src1, Shape shape2, double[] src2, T[] dest)
    Computes the element-wise subtraction of two tensors.
    static <T extends Field<T>>
    boolean
    RealFieldDenseEquals.tensorEquals(double[] src1, Shape shape1, T[] src2, Shape shape2)
    Checks if two dense tensors are equal.
  • Uses of Shape in org.flag4j.linalg.ops.dense.ring_ops

    Methods in org.flag4j.linalg.ops.dense.ring_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Ring<T>>
    boolean
    DenseRingTensorOps.isCloseToIdentity(Shape shape, T[] src)
    Checks if a matrix is the identity matrix approximately.
    static <T extends Ring<T>>
    boolean
    DenseRingTensorOps.isHermitian(Shape shape, T[] src)
    Checks if a complex dense matrix is Hermitian.
    static <T extends Ring<T>>
    void
    DenseRingHermitianTranspose.standardConcurrentHerm(T[] src, Shape shape, int[] axes, T[] dest)
    Computes the conjugate transpose of a tensor using a concurrent implementation.
    static <T extends Ring<T>>
    void
    DenseRingHermitianTranspose.standardConcurrentHerm(T[] src, Shape shape, int axis1, int axis2, T[] dest)
    Computes complex conjugate transpose of a tensor along specified axes using a standard concurrent transpose algorithm.
    static <T extends Ring<T>>
    void
    DenseRingHermitianTranspose.standardHerm(T[] src, Shape shape, int[] axes, T[] dest)
    Computes the conjugate transpose of a tensor using a standard implementation.
    static <T extends Ring<T>>
    void
    DenseRingHermitianTranspose.standardHerm(T[] src, Shape shape, int axis1, int axis2, T[] dest)
    Computes complex conjugate transpose of a tensor along specified axes using a standard transpose algorithm.
    static <T extends Ring<T>>
    void
    DenseRingTensorOps.sub(Shape shape1, T[] src1, Shape shape2, T[] src2, T[] dest)
    Computes the element-wise difference between two dense tensors.
  • Uses of Shape in org.flag4j.linalg.ops.dense.semiring_ops

    Modifier and Type
    Method
    Description
    static Shape
    DenseSemiringOps.getTrShape(Shape shape, int axis1, int axis2)
    Computes the shape of the tensor resulting from the generalized tensor trace along the specified axes for a tensor with the specified shape.
    Methods in org.flag4j.linalg.ops.dense.semiring_ops with parameters of type Shape
    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>>
    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 Shape
    DenseSemiringOps.getTrShape(Shape shape, int axis1, int axis2)
    Computes the shape of the tensor resulting from the generalized tensor trace along the specified axes for a tensor with the specified shape.
    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
    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.
    DenseSemiringMatMultDispatcher.selectAlgorithmVector(Shape shape)
    Dynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.
    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 Shape in org.flag4j.linalg.ops.sparse

    Methods in org.flag4j.linalg.ops.sparse with parameters of type Shape
    Modifier and Type
    Method
    Description
    SparseUtils.coalesce(BinaryOperator<Double> aggregator, Shape shape, double[] data, int[] indices)
    Coalesces this sparse COO vector.
    SparseUtils.coalesce(BinaryOperator<Double> aggregator, Shape shape, double[] data, int[][] indices)
    Coalesces this sparse COO tensor.
    SparseUtils.coalesce(BinaryOperator<Double> aggregator, Shape shape, double[] data, int[] rowIndices, int[] colIndices)
    Coalesces this sparse COO matrix.
    static <T> SparseVectorData<T>
    SparseUtils.coalesce(BinaryOperator<T> aggregator, Shape shape, T[] data, int[] indices)
    Coalesces this sparse COO vector.
    static <T> SparseTensorData<T>
    SparseUtils.coalesce(BinaryOperator<T> aggregator, Shape shape, T[] data, int[][] indices)
    Coalesces this sparse COO tensor.
    static <T> SparseMatrixData<T>
    SparseUtils.coalesce(BinaryOperator<T> aggregator, Shape shape, T[] data, int[] rowIndices, int[] colIndices)
    Coalesces this sparse COO matrix.
    static int[][]
    SparseUtils.cooFlattenIndices(Shape shape, int[][] indices)
    Flattens the non-zero indices of a sparse COO tensor.
    static int[][]
    SparseUtils.cooFlattenIndices(Shape shape, int[][] indices, int axis)
    Flattens the non-zero indices of a sparse COO tensor along a specified axis.
    static int[][]
    SparseUtils.cooReshape(Shape oldShape, Shape newShape, int[][] indices)
    Computes new indices for the reshaping of a sparse COO tensor.
    SparseUtils.dropZeros(Shape shape, double[] data, int[] indices)
    Drops any explicit zeros in this sparse COO vector.
    SparseUtils.dropZeros(Shape shape, double[] data, int[][] indices)
    Drops any explicit zeros in this sparse COO tensor.
    SparseUtils.dropZeros(Shape shape, double[] data, int[] rowIndices, int[] colIndices)
    Drops any explicit zeros in this sparse COO matrix.
    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.
    static void
    SparseUtils.validateCsrMatrix(Shape shape, int nnz, int[] rowPointers, int[] colIndices)
    Validates that the provided arguments specify a valid CSR matrix.
    static void
    SparseUtils.validateSlice(Shape shape, int rowStart, int rowEnd, int colStart, int colEnd)
    Validates that the specified slice is a valid slice of a matrix with the specified shape.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.coo

    Modifier and Type
    Method
    Description
    static <T> Shape
    CooConcat.repeat(T[] src, int[] srcIndices, int size, int n, int axis, T[] destEntries, int[] destRows, int[] destCols)
    Repeats a sparse COO vector n times along a certain axis to create a matrix.
    Methods in org.flag4j.linalg.ops.sparse.coo with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T> SparseVectorData<T>
    CooGetSet.getCol(Shape shape, T[] entries, int[] rowIndices, int[] colIndices, int colIdx, int start, int end)
    Gets a specified column of a COO matrix between start (inclusive) and end (exclusive).
    static <T> SparseVectorData<T>
    CooGetSet.getDiag(Shape shape, T[] entries, int[] rowIndices, int[] colIndices, int diagOffset)
    Gets the elements of a COO matrix along the specified diagonal.
    static <T> SparseVectorData<T>
    CooGetSet.getRow(Shape shape, T[] entries, int[] rowIndices, int[] colIndices, int rowIdx, int start, int end)
    Gets a specified row of a COO matrix between start (inclusive) and end (exclusive).
    static <T> SparseMatrixData<T>
    CooGetSet.getSlice(Shape shape, T[] entries, int[] rowIndices, int[] colIndices, int rowStart, int rowEnd, int colStart, int colEnd)
    Extracts a specified slice from a sparse COO matrix.
    static <T> SparseMatrixData<T>
    CooGetSet.getTriL(int diagOffset, Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Gets the lower-triangular portion of a sparse COO matrix with a possible diagonal offset.
    static <T> SparseMatrixData<T>
    CooGetSet.getTriU(int diagOffset, Shape shape, T[] entries, int[] rowIndices, int[] colIndices)
    Gets the upper-triangular portion of a sparse COO matrix with a possible diagonal offset.
    static <T> boolean
    CooProperties.isSymmetric(Shape shape, T[] data, int[] rowIndices, int[] colIndices, T zeroValue)
    Checks if a sparse COO matrix is symmetric.
    static <T> SparseMatrixData<T>
    CooGetSet.setCol(Shape srcShape, T[] srcEntries, int[] rowIndices, int[] colIndices, int colIdx, int size, T[] col, int[] indices)
    Sets a column of a sparse matrix to the values in a sparse tensor.
    static <T> SparseMatrixData<T>
    CooGetSet.setRow(Shape srcShape, T[] srcEntries, int[] rowIndices, int[] colIndices, int rowIdx, int size, T[] row, int[] indices)
    Sets a specified row of a real sparse COO matrix to the values in a sparse COO vector.
    static <T> SparseMatrixData<T>
    CooGetSet.setSlice(Shape shape1, T[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowIndices, int[] src2ColIndices, int row, int col)
    Copies a sparse matrix and sets a slice of the sparse COO matrix to the data of another sparse COO matrix.
    static void
    CooManipulations.swapCols(Shape shape, Object[] entries, int[] rowIndices, int[] colIndices, int colIdx1, int colIdx2)
    Swaps two columns, in place, in a sparse COO matrix.
    static void
    CooManipulations.swapRows(Shape shape, Object[] entries, int[] rowIndices, int[] colIndices, int rowIdx1, int rowIdx2)
    Swaps two rows, in place, in a sparse COO matrix.
    static void
    CooTranspose.tensorTranspose(Shape shape, Object[] srcEntries, int[][] srcIndices, int[] axes, Object[] destEntries, int[][] destIndices)
    Computes the transpose of a sparse COO tensor.
    static void
    CooTranspose.tensorTranspose(Shape shape, Object[] srcEntries, int[][] srcIndices, int axis1, int axis2, Object[] destEntries, int[][] destIndices)
    Computes the transpose of a sparse COO tensor by exchanging axis1 and axis2.
    static <T> void
    CooConversions.toCsr(Shape shape, T[] entries, int[] rowIndices, int[] colIndices, T[] destEntries, int[] destRowPointers, int[] destColIndices)
    Converts a COO matrix to an equivalent CSR matrix.
    static <T> void
    CooConversions.toDense(Shape shape, T[] entries, int[][] indices, T[] dest)
    Converts a sparse COO tensor to an equivalent dense tensor.
    Constructors in org.flag4j.linalg.ops.sparse.coo with parameters of type Shape
    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 Shape in org.flag4j.linalg.ops.sparse.coo.real

    Methods in org.flag4j.linalg.ops.sparse.coo.real with parameters of type Shape
    Modifier and Type
    Method
    Description
    static double[]
    RealSparseMatMult.concurrentStandard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.
    static double[]
    RealSparseMatMult.concurrentStandardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices)
    Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.
    static boolean
    RealSparseMatrixProperties.isAntiSymmetric(Shape shape, double[] data, int[] rowIndices, int[] colIndices)
    Checks if a sparse COO matrix is symmetric.
    static boolean
    RealSparseMatrixProperties.isSymmetric(Shape shape, double[] data, int[] rowIndices, int[] colIndices)
    Checks if a sparse COO matrix is symmetric.
    static double[]
    RealSparseMatMult.standard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a standard algorithm.
    static double[]
    RealSparseMatMult.standardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices)
    Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.coo.real_complex

    Methods in org.flag4j.linalg.ops.sparse.coo.real_complex with parameters of type Shape
    Modifier and Type
    Method
    Description
    static Complex128[]
    RealComplexSparseMatrixMultiplication.concurrentStandard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.concurrentStandard(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.concurrentStandardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2)
    Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.concurrentStandardVector(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2)
    Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.standard(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.standard(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2)
    Computes the matrix multiplication between two sparse matrices using a standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.standardVector(double[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, Complex128[] src2, int[] indices, Shape shape2)
    Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.
    static Complex128[]
    RealComplexSparseMatrixMultiplication.standardVector(Complex128[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, double[] src2, int[] indices, Shape shape2)
    Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.coo.ring_ops

    Methods in org.flag4j.linalg.ops.sparse.coo.ring_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Ring<T>>
    boolean
    CooRingMatrixOps.isHermitian(Shape shape, T[] data, int[] rowIndices, int[] colIndices)
    Checks if a sparse COO Ring matrix is Hermitian.
    static <V extends Ring<V>>
    SparseMatrixData<V>
    CooRingMatrixOps.sub(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices)
    Computes the element-wise difference of two sparse matrices.
    static <V extends Ring<V>>
    SparseTensorData<V>
    CooRingTensorOps.sub(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 Ring<T>>
    SparseVectorData<T>
    CooRingVectorOps.sub(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices)
    Computes the element-wise vector subtraction between two real sparse vectors.
    static <T extends Ring<T>>
    void
    CooRingHermTranspose.tensorHermTranspose(Shape shape, T[] srcEntries, int[][] srcIndices, int[] axes, T[] destEntries, int[][] destIndices)
    Computes the Hermitian transpose of a sparse COO tensor.
    static <T extends Ring<T>>
    void
    CooRingHermTranspose.tensorHermTranspose(Shape shape, T[] srcEntries, int[][] srcIndices, int axis1, int axis2, T[] destEntries, int[][] destIndices)
    Computes the Hermitian transpose of a sparse COO tensor by exchanging axis1 and axis2.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.coo.semiring_ops

    Methods in org.flag4j.linalg.ops.sparse.coo.semiring_ops with parameters of type Shape
    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
    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 Shape in org.flag4j.linalg.ops.sparse.csr

    Modifier and Type
    Method
    Description
    static <T> Shape
    CsrConversions.flatten(Shape shape, T[] entries, int[] rowPointers, int[] colIndices, int axis, int[] destRowPointers, int[] destColIndices)
    Computes the new row pointers and column indices for a sparse CSR matrix flattened along some axis.
    Methods in org.flag4j.linalg.ops.sparse.csr with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T> SparseMatrixData<T>
    CsrOps.applyBinOpp(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices, BinaryOperator<T> opp, UnaryOperator<T> uOpp)
    Applies an element-wise binary operation to two csr matrices.
    static <T> Shape
    CsrConversions.flatten(Shape shape, T[] entries, int[] rowPointers, int[] colIndices, int axis, int[] destRowPointers, int[] destColIndices)
    Computes the new row pointers and column indices for a sparse CSR matrix flattened along some axis.
    static <T> SparseMatrixData<T>
    CsrOps.getSlice(Shape shape, T[] entries, int[] rowPointers, int[] colIndices, int rowStart, int rowEnd, int colStart, int colEnd)
    Gets a specified slice of a CSR matrix.
    static <T> boolean
    CsrProperties.isSymmetric(Shape shape, T[] values, int[] rowPointers, int[] colIndices, T zeroValue)
    Checks if a sparse CSR matrix is symmetric.
    static <T> void
    CsrConversions.toCoo(Shape shape, T[] entries, int[] rowPointers, int[] colIndices, T[] destEntries, int[] destRowIndices, int[] destColIndices)
    Converts a sparse CSR matrix to an equivalent sparse COO matrix.
    static <T> void
    CsrConversions.toDense(Shape shape, T[] entries, int[] rowPointers, int[] colIndices, T[] dest, T zero)
    Converts a sparse CSR matrix to a dense matrix.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.csr.ring_ops

    Methods in org.flag4j.linalg.ops.sparse.csr.ring_ops with parameters of type Shape
    Modifier and Type
    Method
    Description
    static <T extends Ring<T>>
    boolean
    CsrRingProperties.isHermitian(Shape shape, T[] values, int[] rowPointers, int[] colIndices)
    Checks if a sparse CSR matrix is Hermitian.
  • Uses of Shape in org.flag4j.linalg.ops.sparse.csr.semiring_ops

    Methods in org.flag4j.linalg.ops.sparse.csr.semiring_ops with parameters of type Shape
    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>>
    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.
  • Uses of Shape in org.flag4j.linalg.solvers.exact

    Methods in org.flag4j.linalg.solvers.exact that return Shape
    Modifier and Type
    Method
    Description
    protected Shape
    ExactTensorSolver.getOutputShape(T A, T B, int aRankOriginal)
    Constructs the shape of the output.
    Methods in org.flag4j.linalg.solvers.exact with parameters of type Shape
    Modifier and Type
    Method
    Description
    protected CTensor
    ComplexExactTensorSolver.wrap(CVector x, Shape outputShape)
    Wraps solution as a tensor and reshapes to the proper shape.
    protected abstract T
    ExactTensorSolver.wrap(V x, Shape outputShape)
    Wraps solution as a tensor and reshapes to the proper shape.
    protected Tensor
    RealExactTensorSolver.wrap(Vector x, Shape outputShape)
    Wraps solution as a tensor and reshapes to the proper shape.
  • Uses of Shape in org.flag4j.rng

    Methods in org.flag4j.rng with parameters of type Shape
    Modifier and Type
    Method
    Description
    RandomDenseTensor.randnCMatrix(Shape shape)
    Generates a matrix filled with pseudorandom values sampled from a bivariate standard Gaussian (normal) distribution with mean zero and standard deviation one along both the real and imaginary axes.
    RandomDenseTensor.randnCMatrix(Shape shape, double mean, double std)
    Generates a matrix filled with pseudorandom values sampled from a bivariate Gaussian (normal) distribution with specified mean and standard deviation along both the real and imaginary axes.
    RandomDenseTensor.randnCMatrix(Shape shape, double meanRe, double stdRe, double meanIm, double stdIm, double corrCoeff)
    Generates a matrix filled with pseudorandom values sampled from a bivariate Gaussian (normal) distribution.
    RandomDenseTensor.randnCTensor(Shape shape)
    Generates a tensor filled with pseudorandom values sampled from a bivariate standard Gaussian (normal) distribution with mean zero and standard deviation one along both the real and imaginary axes.
    RandomDenseTensor.randnCTensor(Shape shape, double mean, double std)
    Generates a tensor filled with pseudorandom values sampled from a bivariate Gaussian (normal) distribution with specified mean and standard deviation along both the real and imaginary axes.
    RandomDenseTensor.randnCTensor(Shape shape, double meanRe, double stdRe, double meanIm, double stdIm, double corrCoeff)
    Generates a tensor filled with pseudorandom values sampled from a bivariate Gaussian (normal) distribution.
    RandomDenseTensor.randnMatrix(Shape shape)
    Generates a matrix filled with pseudorandom values sampled from a normal distribution with mean of 0.0 and standard deviation of 1.0.
    RandomDenseTensor.randnMatrix(Shape shape, double mean, double std)
    Generates a matrix filled with pseudorandom values sampled from a normal distribution with specified mean and standard deviation.
    RandomDenseTensor.randnTensor(Shape shape)
    Generates a tensor filled with pseudorandom values sampled from a normal distribution with mean of 0.0 and standard deviation of 1.0.
    RandomDenseTensor.randnTensor(Shape shape, double mean, double std)
    Generates a tensor filled with pseudorandom values sampled from a normal distribution with specified mean and standard deviation.
    RandomDenseTensor.randomCMatrix(Shape shape)
    Generates a matrix filled with pseudorandom complex values uniformly distributed in the unit disk centered at the origin of the complex plane.
    RandomDenseTensor.randomCMatrix(Shape shape, double min, double max)
    Generates a matrix filled with pseudorandom complex values uniformly distributed in an annulus (i.e. washer) centered at the origin of the complex plane.
    RandomSparseTensor.randomCooMatrix(Shape shape, double min, double max, double sparsity)
    Generates a random sparse matrix with the specified sparsity.
    RandomSparseTensor.randomCooMatrix(Shape shape, double min, double max, int numNonZeroEntries)
    Generates a random sparse matrix with the specified number of non-zero data.
    RandomSparseTensor.randomCsrMatrix(Shape shape, double min, double max, double sparsity)
    Generates a random sparse matrix with the specified sparsity.
    RandomSparseTensor.randomCsrMatrix(Shape shape, double min, double max, int numNonZeroEntries)
    Generates a random sparse matrix with the specified number of non-zero data.
    RandomDenseTensor.randomCTensor(Shape shape)
    Generates a tensor filled with pseudorandom complex values uniformly distributed in the unit disk centered at the origin of the complex plane.
    RandomDenseTensor.randomCTensor(Shape shape, double min, double max)
    Generates a tensor filled with pseudorandom complex values uniformly distributed in an annulus (i.e. washer) centered at the origin of the complex plane.
    RandomDenseTensor.randomMatrix(Shape shape)
    Generates a matrix filled with pseudorandom values uniformly distributed in [0, 1).
    RandomDenseTensor.randomMatrix(Shape shape, double min, double max)
    Generates a matrix filled with pseudorandom values uniformly distributed in [min, max).
    RandomSparseTensor.randomSparseCMatrix(Shape shape, double min, double max, double sparsity)
    Generates a random sparse matrix with the specified sparsity.
    RandomSparseTensor.randomSparseCMatrix(Shape shape, double min, double max, int numNonZeroEntries)
    Generates a random sparse matrix with the specified number of non-zero data.
    RandomDenseTensor.randomTensor(Shape shape)
    Generates a tensor filled with pseudorandom values uniformly distributed in [0, 1).
    RandomDenseTensor.randomTensor(Shape shape, double min, double max)
    Generates a tensor filled with pseudorandom values uniformly distributed in [min, max).
  • Uses of Shape in org.flag4j.util

    Methods in org.flag4j.util that return Shape
    Modifier and Type
    Method
    Description
    static Shape
    ArrayUtils.nDArrayShape(Object nDArray)
    Infers the shape of a rectangular nD Java array.
    Methods in org.flag4j.util with parameters of type Shape
    Modifier and Type
    Method
    Description
    static void
    ValidateParameters.ensureEqualShape(Shape shape1, Shape shape2)
    Checks if two Shape objects are equivalent.
    static void
    ValidateParameters.ensureMatMultShapes(Shape shape1, Shape shape2)
    Checks if two Shape objects satisfy the requirements of matrix-matrix or matrix-vector multiplication.
    static void
    ValidateParameters.ensureRank(Shape shape, int expRank)
    Checks that a shape has the specified rank.
    static void
    ValidateParameters.ensureSquare(Shape shape)
    Checks if a shape represents a square tensor.
    static void
    ValidateParameters.ensureSquareMatrix(Shape shape)
    Checks if a shape represents a square matrix.
    static void
    ValidateParameters.ensureTotalEntriesEqual(Shape shape1, Shape shape2)
    Checks that two shapes have the same total number of data.
    static void
    ValidateParameters.ensureValidAxes(Shape shape, int... axes)
    Checks if all provided axes are valid with respect to the rank of the given shape.
    static String
    ErrorMessages.equalShapeErrMsg(Shape shape1, Shape shape2)
    Gets an error message for two tensors with mismatching shapes.
    static String
    ErrorMessages.getShapeTotalEntriesErr(Shape shape1, Shape shape2)
    Gets an error message for two shapes which cannot be broadcast together.
    static String
    ErrorMessages.getSquareShapeErr(Shape shape)
    Gets an error message for a shape which was expected to be square but was not
    static String
    ErrorMessages.matMultShapeErrMsg(Shape shape1, Shape shape2)
    Gets an error message for two matrices with shapes not conducive with matrix multiplication.
    static int
    ArrayUtils.nDFlatten(Object nDArray, Shape shape, double[] flatArray, int offset)
    Recursively validates the shape of the nD array and flattens it into the provided 1D array.
    static <T> int
    ArrayUtils.nDFlatten(Object nDArray, Shape shape, T[] flatArray, int offset)
    Recursively validates the shape of the nD array and flattens it into the provided 1D array.
    static String
    ErrorMessages.shapeEntriesError(Shape shape, int numEntries)
    Gets an error message for a shape which cannot hold a specified number of data.
    static void
    ValidateParameters.validateTensorIndex(Shape shape, int... index)
    Checks if the provided nD index is contained in a tensor defined by the given shape.
    static void
    ValidateParameters.validateTensorIndices(Shape shape, int[]... indices)
    Checks that a set of nD indices are valid indices for a tensor with the specified shape.