Uses of Class
org.flag4j.arrays.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
Modifier and TypeMethodDescriptionShape.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 theshape
record component.SparseTensorData.shape()
Returns the value of theshape
record component.SparseVectorData.shape()
Returns the value of theshape
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.ModifierConstructorDescriptionCreates an instance of aSparseMatrixData
record class.SparseTensorData
(Shape shape, List<T> data, List<int[]> indices) Creates an instance of aSparseTensorData
record class.Creates an instance of aSparseVectorData
record class. -
Uses of Shape in org.flag4j.arrays.backend
Modifier and TypeMethodDescriptionAbstractTensor.getShape()
Gets the shape of this tensor.MatrixMixin.getShape()
Gets the shape of this matrix.Modifier and TypeMethodDescriptionabstract T
AbstractTensor.makeLikeTensor
(Shape shape, U entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.abstract T
Copies and reshapes this tensor.ModifierConstructorDescriptionprotected
AbstractTensor
(Shape shape, U data) Creates a tensor with the specified data and shape. -
Uses of Shape in org.flag4j.arrays.backend.field_arrays
Modifier and TypeMethodDescriptionabstract AbstractCsrFieldMatrix
<?, U, V, W> 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.ModifierConstructorDescriptionprotected
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 specifiedshape
, non-zero data, row pointers, and non-zero column indices.protected
AbstractDenseFieldMatrix
(Shape shape, V[] data) 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
Modifier and TypeMethodDescriptionCopies and reshapes this tensor.ModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionabstract AbstractCsrRingMatrix
<?, U, V, W> 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> Converts this matrix to an equivalent tensor with the specified shape.ModifierConstructorDescriptionprotected
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 specifiedshape
, non-zero data, row pointers, and non-zero column indices.protected
AbstractDenseRingMatrix
(Shape shape, V[] data) Creates a tensor with the specified data and shape.protected
AbstractDenseRingTensor
(Shape shape, V[] data) Creates a tensor with the specified data and shape.protected
AbstractDenseRingVector
(Shape shape, V[] data) Creates a tensor with the specified data and shape. -
Uses of Shape in org.flag4j.arrays.backend.semiring_arrays
Modifier and TypeMethodDescriptionabstract AbstractCooSemiringMatrix
<?, U, V, W> AbstractCsrSemiringMatrix.makeLikeCooMatrix
(Shape shape, W[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix of a similar type to this sparse CSR matrix.protected abstract AbstractCooSemiringMatrix
<?, T, ?, V> AbstractDenseSemiringMatrix.makeLikeCooMatrix
(Shape shape, V[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO matrix which is of a similar type as this dense matrix.protected abstract AbstractTensor
<?, V[], V> AbstractDenseSemiringTensor.makeLikeCooTensor
(Shape shape, V[] data, int[][] indices) Constructs a sparse COO tensor which is of a similar type as this dense tensor.abstract AbstractCsrSemiringMatrix
<?, U, V, W> AbstractCooSemiringMatrix.makeLikeCsrMatrix
(Shape shape, W[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix of a similar type to this sparse COO matrix.abstract AbstractCsrSemiringMatrix
<?, T, ?, V> AbstractDenseSemiringMatrix.makeLikeCsrMatrix
(Shape shape, V[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR matrix which is of a similar type as this dense matrix.abstract W
AbstractCooSemiringVector.makeLikeDenseMatrix
(Shape shape, Y... entries) Constructs a dense matrix of a similar type as this vector with the specified shape and data.abstract U
AbstractCooSemiringMatrix.makeLikeDenseTensor
(Shape shape, W[] entries) Constructs a dense tensor with the specifiedshape
anddata
which is a similar type to this sparse tensor.abstract U
AbstractCooSemiringTensor.makeLikeDenseTensor
(Shape shape, V[] entries) Constructs a dense tensor that is a similar type as this sparse COO tensor.abstract U
AbstractCooSemiringVector.makeLikeDenseTensor
(Shape shape, Y... entries) Constructs a dense vector of a similar type as this vector with the specified shape and data.abstract U
AbstractCsrSemiringMatrix.makeLikeDenseTensor
(Shape shape, W[] entries) Constructs a dense matrix which is of a similar type to this sparse CSR matrix.abstract V
AbstractCooSemiringVector.makeLikeMatrix
(Shape shape, Y[] entries, int[] rowIndices, int[] colIndices) Constructs a COO matrix with the specified shape, non-zero data, and row and column indices.protected abstract U
AbstractDenseSemiringVector.makeLikeMatrix
(Shape shape, V[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.abstract T
AbstractCooSemiringMatrix.makeLikeTensor
(Shape shape, 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
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 theshape
anddata
.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.Copies and reshapes this tensor.Copies and reshapes this tensor.Copies and reshapes this tensor.Copies and reshapes this tensor.Copies and reshapes this tensor.abstract AbstractCooSemiringTensor
<?, ?, W> Converts this matrix to an equivalent tensor with the specified shape.abstract AbstractTensor
<?, Y[], Y> Converts this vector to an equivalent tensor with the specified shape.Converts this CSR matrix to an equivalent COO tensor with the specified shape.abstract AbstractDenseSemiringTensor
<?, V> Converts this matrix to an equivalent tensor with the specifiednewShape
.ModifierConstructorDescriptionprotected
AbstractCooSemiringMatrix
(Shape shape, W[] entries, int[] rowIndices, int[] colIndices) Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.protected
AbstractCooSemiringTensor
(Shape shape, V[] data, int[][] indices) Creates a tensor with the specified data and shape.protected
AbstractCooSemiringVector
(Shape shape, Y[] entries, int[] indices) Creates a sparse COO semiring vector with the specified data and shape.protected
AbstractCsrSemiringMatrix
(Shape shape, W[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.protected
AbstractDenseSemiringMatrix
(Shape shape, V[] entries) Creates a tensor with the specified data and shape.protected
AbstractDenseSemiringTensor
(Shape shape, V[] data) Creates a tensor with the specified data and shape.protected
AbstractDenseSemiringVector
(Shape shape, V[] data) Constructs a dense semiring vector with the specified data and shape. -
Uses of Shape in org.flag4j.arrays.dense
Modifier and TypeMethodDescriptionstatic CMatrix
Constructs an identity-like matrix of the specified shape.static <T extends Field<T>>
FieldMatrix<T> Constructs an identity-like matrix of the specified shape.static Matrix
Constructs an identity-like matrix of the specified shape.static <T extends Ring<T>>
RingMatrix<T> Constructs an identity-like matrix of the specified shape.static <T extends Semiring<T>>
SemiringMatrix<T> 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 specifiedshape
anddata
.FieldVector.makeLikeMatrix
(Shape shape, T[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.protected RingMatrix
<T> RingVector.makeLikeMatrix
(Shape shape, T[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.protected SemiringMatrix
<T> SemiringVector.makeLikeMatrix
(Shape shape, T[] entries) Constructs a matrix of similar type to this vector with the specifiedshape
anddata
.CMatrix.makeLikeTensor
(Shape shape, Complex128[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.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 theshape
anddata
.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 theshape
anddata
.RingTensor.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.RingVector.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringMatrix.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringTensor.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.SemiringVector.makeLikeTensor
(Shape shape, T[] entries) Constructs a tensor of the same type as this tensor with the given theshape
anddata
.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.Converts this tensor to a matrix with the specified shape.Converts this tensor to a matrix with the specified shape.Converts this tensor to a matrix with the specified shape.Converts this tensor to an equivalent matrix with the specified shape.Converts this matrix to an equivalent tensor with the specifiednewShape
.Converts this matrix to an equivalent tensor with the specifiednewShape
.Converts this matrix to an equivalent tensor with the specifiednewShape
.Converts this matrix to an equivalent tensor with the specifiednewShape
.ModifierConstructorDescriptionCreates a zero matrix with the specifiedshape
.Constructs a complex matrix with specifiedshape
anddata
.Creates matrix with the specifiedshape
filled withfillValue
.CMatrix
(Shape shape, Complex128 fillValue) Creates a complex matrix with the specifiedshape
filled withfillValue
.CMatrix
(Shape shape, Complex128[] entries) Creates a complex matrix with the specifieddata
andshape
.Creates a zero tensor with the specified shape.Creates a tensor with the specified shape and filled withfillValue
.Creates a tensor with the specified data and shape.Creates a tensor with the specified shape and filled withfillValue
.Creates a tensor with the specified data and shape.CTensor
(Shape shape, Complex128 fillValue) Creates a tensor with the specified shape and filled withfillValue
.CTensor
(Shape shape, Complex128[] entries) Creates a tensor with the specified data and shape.Creates a tensor with the specified shape and filled withfillValue
.Creates a tensor with the specified data and 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 withfilledValue
.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 withfillValue
.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.Creates a real dense matrix with specified shape filled with zeros.Creates a real dense matrix with specified shape filled with a specific value.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 withfilledValue
.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 withfilledValue
.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 withfilledValue
.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 withfilledValue
.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.Creates a zero tensor with the shape.Creates a tensor with the specified shape filled withfillValue
.Creates a tensor with the specified data and shape.Creates a tensor with the specified data and shape.Creates a tensor with the specified data and shape.Creates a tensor with the specified data and shape.Creates a vector of the specified shape filled with zeros.Creates a vector of specified size filled with a specified value.Creates a tensor with the specified data and shape. -
Uses of Shape in org.flag4j.arrays.sparse
Modifier and TypeFieldDescriptionfinal Shape
PermutationMatrix.shape
Shape of this permutation matrix.Modifier and TypeMethodDescriptionSymmTriDiag.getShape()
Gets the shape of this symmetric tri-diagonal matrix.Modifier and TypeMethodDescriptionCooTensor.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 specifiedshape
anddata
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 specifiedshape
anddata
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 specifiedshape
anddata
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 specifiedshape
anddata
which is a similar type to this sparse tensor.CooSemiringTensor.makeLikeDenseTensor
(Shape shape, T[] entries) Constructs a dense tensor that is a similar type as this sparse COO tensor.CooSemiringVector.makeLikeDenseTensor
(Shape shape, T... entries) Constructs a dense vector of a similar type as this vector with the specified shape and data.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 theshape
anddata
.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 theshape
anddata
.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 theshape
anddata
.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 theshape
anddata
.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.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 theshape
anddata
.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 theshape
anddata
.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 theshape
anddata
.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.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 theshape
anddata
.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 theshape
anddata
.CooSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Constructs a sparse COO tensor of the same type as this tensor with the specified non-zero data and indices.CooSemiringTensor.makeLikeTensor
(Shape shape, 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 theshape
anddata
.CooSemiringTensor.makeLikeTensor
(Shape shape, T[] data, int[][] indices) Constructs a tensor of the same type as this tensor with the specified shape and non-zero data.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 theshape
anddata
.CooSemiringVector.makeLikeTensor
(Shape shape, T[] entries, int[] indices) Constructs a sparse COO vector of the same type as this vector with the specified non-zero data and indices.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 theshape
anddata
.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 theshape
anddata
.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 theshape
anddata
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 theshape
anddata
.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 theshape
anddata
.CsrSemiringMatrix.makeLikeTensor
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Constructs a sparse CSR tensor of the same type as this tensor with the specified non-zero data and indices.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.Copies and reshapes this tensor.Copies and reshapes this tensor.Copies and reshapes this tensor.Copies and reshapes this tensor.Converts this tensor to a matrix with specified shape.Converts this tensor to a matrix with the specified shape.Converts this tensor to a matrix with the specified shape.Converts this tensor to a matrix with the specified shape.Converts this matrix to an equivalent tensor with the specified shape.Converts this vector to an equivalent tensor with the specified shape.Converts this matrix to an equivalent tensor with the specified shape.Converts this vector to an equivalent tensor with the specified shape.Converts this matrix to an equivalent tensor with the specified shape.Converts this vector to an equivalent tensor with the specified shape.Converts this matrix to an equivalent tensor with the specified shape.Converts this vector to an equivalent tensor with the specified shape.Converts this CSR matrix to an equivalent COO tensor with the specified shape.Converts this CSR matrix to an equivalent COO tensor with the specified shape.Converts this CSR matrix to an equivalent COO tensor with the specified shape.Converts this CSR matrix to an equivalent COO tensor with the specified shape.ModifierConstructorDescriptionCooCMatrix
(Shape shape) 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.CooCTensor
(Shape 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.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 specifiedsize
, non-zero data, and non-zero indices.Constructs a zero matrix with the specified shape.Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.Creates a sparse coo matrix with the specified non-zero data, non-zero indices, and shape.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.Creates sparse COO vector with the specifiedsize
, non-zero data, and non-zero indices.CooRingVector
(Shape shape, T[] entries, int[] indices) Creates a tensor with the specified data and shape.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.Creates sparse COO vector with the specifiedsize
, 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.Creates a tensor with the specified data and shape.Creates a sparse COO matrix with the specified shape, non-zero data, and indices.Creates a tensor with the specified data and shape.Creates sparse COO vector with the specifiedsize
, non-zero data, and non-zero indices.Creates sparse COO vector with the specifiedsize
, non-zero data, and non-zero indices.CsrCMatrix
(Shape shape) 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 specifiedshape
, 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 specifiedshape
, non-zero data, row pointers, and non-zero column indices.Creates a sparse CSR matrix with the specifiedshape
, 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 whichfieldElement
belongs to.CsrFieldMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.Constructs zero matrix with the specifiedshape
.Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.Creates a sparse CSR matrix with the specifiedshape
, 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 whichringElement
belongs to.CsrRingMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.CsrSemiringMatrix
(Shape shape, List<T> entries, List<Integer> rowPointers, List<Integer> colIndices) Creates a sparse CSR matrix with the specifiedshape
, 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 whichsemiringElement
belongs to.CsrSemiringMatrix
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Creates a sparse CSR matrix with the specifiedshape
, non-zero data, row pointers, and non-zero column indices.PermutationMatrix
(Shape shape) Creates a permutation matrix which is equivalent to the identity matrix of the specified size. -
Uses of Shape in org.flag4j.concurrency
-
Uses of Shape in org.flag4j.io
Modifier and TypeMethodDescriptionstatic <T> String
PrettyPrint.matrixToString
(Shape shape, double[] data) Converts a matrix into a "pretty" string using parameters set in thePrintOptions
class.static <T> String
PrettyPrint.matrixToString
(Shape shape, T[] data) Converts a matrix into a "pretty" string using parameters set in thePrintOptions
class. -
Uses of Shape in org.flag4j.linalg.decompositions.svd
Modifier and TypeMethodDescriptionprotected void
Initializes the unitary U and V matrices for the SVD.protected void
Initializes the unitaryU
andV
matrices for the SVD.protected abstract void
Initializes the unitary U and V matrices for the SVD. -
Uses of Shape in org.flag4j.linalg.ops
Modifier and TypeFieldDescriptionprotected Shape
TensorDot.destShape
protected Shape
TensorDot.newShape1
protected Shape
TensorDot.newShape2
protected Shape
TensorDot.shape1
protected Shape
TensorDot.shape2
Modifier and TypeMethodDescriptionTensorDot.getOutputShape()
Gets the shape of the tensor resulting from this tensor dot product as specified in the constructor.Modifier and TypeMethodDescriptiondouble[]
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[]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[]
Dispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.static Object[]
Dispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.static <T extends Ring<T>>
voidTransposeDispatcher.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>>
voidTransposeDispatcher.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>>
voidTransposeDispatcher.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. -
Uses of Shape in org.flag4j.linalg.ops.dense
Modifier and TypeMethodDescriptionstatic double[]
Computes the transpose of a tensor.static <T> Object[]
Computes the transpose of a tensor.static Object[]
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
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
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.ModifierConstructorDescriptionDenseSemiringTensorDot
(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
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatrixOps.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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>>
voidDenseCooFieldMatMult.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
Modifier and TypeMethodDescriptionstatic 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 TypeMethodDescriptionstatic 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 TypeMethodDescriptionstatic <T extends Field<T>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMultTranspose.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>>
voidRealFieldDenseCooMatMultTranspose.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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>>
voidRealFieldDenseCooMatMult.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
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidDynamically chooses and applies element-wise division algorithm to use based on the number of data in the tensors.static <T extends Field<T>>
voidComputes the element-wise division between two tensors.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidDenseFieldElemDiv.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
Modifier and TypeMethodDescriptionstatic void
Computes element-wise addition between tensors and stores the result in the first tensor.static double[]
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[]
Computes the matrix multiplication between two real dense matrices using the standard algorithm with j-k loops swapped.static void
Sets an element of a tensor to the specified value.static double[]
Computes the matrix multiplication between two real dense matrices using the standard algorithm.static double[]
Computes the transpose of a tensor.static double[]
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
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.ModifierConstructorDescriptionRealDenseTensorDot
(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
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidComputes the element-wise addition of two tensors.static <T extends Field<T>>
voidComputes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.static <T extends Field<T>>
voidComputes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.static <T extends Field<T>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidDynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.static <T extends Field<T>>
voidDynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.static <T extends Field<T>>
voidDynamically chooses and applies element-wise multiplication algorithm to use based on the number of data in the tensors.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidComputes the element-wise division between two dense tensors.static <T extends Field<T>>
voidComputes the element-wise division between two dense tensors.static <T extends Field<T>>
voidRealFieldDenseElemDiv.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>>
voidRealFieldDenseElemDiv.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>>
voidComputes the element-wise multiplication of two tensors.static <T extends Field<T>>
voidComputes the element-wise multiplication between two dense tensors.static <T extends Field<T>>
voidRealFieldDenseElemMult.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidRealFieldDenseMatMultTranspose.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>>
voidComputes 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>>
voidComputes 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>>
voidComputes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.static <T extends Field<T>>
voidComputes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.static <T extends Field<T>>
voidRealFieldDenseMatMult.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>>
voidRealFieldDenseMatMult.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>>
voidComputes the element-wise subtraction of two tensors.static <T extends Field<T>>
voidComputes the element-wise subtraction of two tensors.static <T extends Field<T>>
booleanRealFieldDenseEquals.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
Modifier and TypeMethodDescriptionstatic <T extends Ring<T>>
booleanDenseRingTensorOps.isCloseToIdentity
(Shape shape, T[] src) Checks if a matrix is the identity matrix approximately.static <T extends Ring<T>>
booleanDenseRingTensorOps.isHermitian
(Shape shape, T[] src) Checks if a complex dense matrix is Hermitian.static <T extends Ring<T>>
voidDenseRingHermitianTranspose.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>>
voidDenseRingHermitianTranspose.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>>
voidDenseRingHermitianTranspose.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>>
voidDenseRingHermitianTranspose.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>>
voidComputes the element-wise difference between two dense tensors. -
Uses of Shape in org.flag4j.linalg.ops.dense.semiring_ops
Modifier and TypeMethodDescriptionstatic 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.Modifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
T[]Computes the element-wise addition of two tensors.static <T extends Semiring<T>>
voidComputes the matrix multiplication of two dense matrices using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.blockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentBlockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandard
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.concurrentStandardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidDynamically chooses and applies an element-wise multiplication algorithm to use based on the number of data in the tensors.static <T extends Semiring<T>>
voidDispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix multiply-transpose problem equivalent tosrc1.mult(src2.T())
to the appropriate algorithm based on the size of the matrices.static <T extends Semiring<T>>
voidDenseSemiringMatMultDispatcher.dispatchVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dispatches a matrix-vector multiplication problem to the appropriate algorithm based on the size of the matrix and vector.static <T extends Semiring<T>>
voidComputes the element-wise multiplication of two tensors.static <T extends Semiring<T>>
T[]Computes the element-wise product of two tensors.static <T extends Semiring<T>>
voidDenseSemiringElemMult.elemMultConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the element-wise multiplication of two tensors using a concurrent algorithm.static 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>>
voidDenseSemiringMatMultTranspose.multTranspose
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeBlockedConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMultTranspose.multTransposeConcurrent
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Multiplies a matrix to the transpose of a second matrix using a concurrent algorithm.static <T extends Semiring<T>>
voidComputes 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>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm.static <T extends Semiring<T>>
voidDenseSemiringMatMult.standardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using the standard algorithm.static <T extends Semiring<T>>
voidComputes the generalized trace of this tensor along the specified axes.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> Converts a dense matrix to an equivalent sparse COO matrix.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries) Converts a dense tensor to an equivalent sparse COO tensor.static <T extends Semiring<T>>
SparseTensorData<T> DenseSemiringConversions.toCooTensor
(Shape shape, T[] entries, double estimatedSparsity) Converts a dense tensor to an equivalent sparse COO tensor. -
Uses of Shape in org.flag4j.linalg.ops.sparse
Modifier and TypeMethodDescriptionstatic SparseVectorData
<Double> SparseUtils.coalesce
(BinaryOperator<Double> aggregator, Shape shape, double[] data, int[] indices) Coalesces this sparse COO vector.static SparseTensorData
<Double> SparseUtils.coalesce
(BinaryOperator<Double> aggregator, Shape shape, double[] data, int[][] indices) Coalesces this sparse COO tensor.static SparseMatrixData
<Double> 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.static SparseVectorData
<Double> Drops any explicit zeros in this sparse COO vector.static SparseTensorData
<Double> Drops any explicit zeros in this sparse COO tensor.static SparseMatrixData
<Double> Drops any explicit zeros in this sparse COO matrix.static <T extends Semiring<T>>
SparseVectorData<T> Drops any explicit zeros in this sparse COO vector.static <T extends Semiring<T>>
SparseTensorData<T> Drops any explicit zeros in this sparse COO tensor.static <T extends Semiring<T>>
SparseMatrixData<T> Drops any explicit zeros in this sparse COO matrix.static <T extends Semiring<T>>
SparseMatrixData<T> SparseUtils.dropZerosCsr
(Shape shape, T[] data, int[] rowPointers, int[] colIndices) Drops all explicit zeros within a sparse CSR matrix.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 specifiedshape
. -
Uses of Shape in org.flag4j.linalg.ops.sparse.coo
Modifier and TypeMethodDescriptionstatic <T> Shape
CooConcat.repeat
(T[] src, int[] srcIndices, int size, int n, int axis, T[] destEntries, int[] destRows, int[] destCols) Repeats a sparse COO vectorn
times along a certain axis to create a matrix.Modifier and TypeMethodDescriptionstatic <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 betweenstart
(inclusive) andend
(exclusive).static <T> SparseVectorData
<T> 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 betweenstart
(inclusive) andend
(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> Gets the lower-triangular portion of a sparse COO matrix with a possible diagonal offset.static <T> SparseMatrixData
<T> 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 exchangingaxis1
andaxis2
.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
Converts a sparse COO tensor to an equivalent dense tensor.ModifierConstructorDescriptionCooTensorDot
(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
Modifier and TypeMethodDescriptionstatic 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
Modifier and TypeMethodDescriptionstatic 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
Modifier and TypeMethodDescriptionstatic <T extends Ring<T>>
booleanCooRingMatrixOps.isHermitian
(Shape shape, T[] data, int[] rowIndices, int[] colIndices) Checks if a sparse COORing
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>>
voidCooRingHermTranspose.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>>
voidCooRingHermTranspose.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 exchangingaxis1
andaxis2
. -
Uses of Shape in org.flag4j.linalg.ops.sparse.coo.semiring_ops
Modifier and TypeMethodDescriptionstatic <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.add
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Adds two sparse matrices.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.add
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Sums two complex sparse COO tensors and stores result in a new COO tensor.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.add
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector addition between two real sparse vectors.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.concurrentStandardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a concurrent implementation of the standard algorithm.static <T extends Semiring<T>>
TCooSemiringVectorOps.dot
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the dot product between two sparse COO vectors.static <V extends Semiring<V>>
SparseMatrixData<V> CooSemiringMatrixOps.elemMult
(Shape shape1, V[] src1Entries, int[] src1RowIndices, int[] src1ColIndices, Shape shape2, V[] src2Entries, int[] src2RowIndices, int[] src2ColIndices) Multiplies two sparse matrices element-wise.static <V extends Semiring<V>>
SparseTensorData<V> CooSemiringTensorOps.elemMult
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Computes the element-wise multiplication between two complex sparse COO tensors.static <T extends Semiring<T>>
SparseVectorData<T> CooSemiringVectorOps.elemMult
(Shape shape1, T[] src1, int[] src1Indices, Shape shape2, T[] src2, int[] src2Indices) Computes the element-wise vector multiplication between two real sparse vectors.static <T extends Semiring<T>>
booleanCooSemiringMatrixProperties.isIdentity
(Shape shape, T[] entries, int[] rowIndices, int[] colIndices) Checks if a complex sparse COO matrix is the identity matrix.static <T extends Semiring<T>>
voidCooSemiringMatMult.standard
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] rowIndices2, int[] colIndices2, Shape shape2, T[] dest) Computes the matrix multiplication between two sparse matrices using a standard algorithm.static <T extends Semiring<T>>
voidCooSemiringMatMult.standardVector
(T[] src1, int[] rowIndices1, int[] colIndices1, Shape shape1, T[] src2, int[] indices, T[] dest) Computes the multiplication between a sparse matrix and a sparse vector using a standard algorithm.static <T extends Semiring<T>>
SparseTensorData<T> Computes the generalized trace of a tensor along the specified axes. -
Uses of Shape in org.flag4j.linalg.ops.sparse.csr
Modifier and TypeMethodDescriptionstatic <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 someaxis
.Modifier and TypeMethodDescriptionstatic <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 someaxis
.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
Modifier and TypeMethodDescriptionstatic <T extends Ring<T>>
booleanCsrRingProperties.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
Modifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
booleanSemiringCsrProperties.isIdentity
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrc
matrix is the identity matrix.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is lower-triangular.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is upper-triangular.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standard
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices, T[] destEntries, Semiring<T> zero) Computes the matrix multiplication between two sparse CSR matrices.static <T extends Semiring<T>>
SparseMatrixData<T> SemiringCsrMatMult.standardToSparse
(Shape shape1, T[] src1Entries, int[] src1RowPointers, int[] src1ColIndices, Shape shape2, T[] src2Entries, int[] src2RowPointers, int[] src2ColIndices) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static <T extends Semiring<T>>
voidSemiringCsrMatMult.standardVector
(Shape shape, T[] src1, int[] rowPointers, int[] colIndices, int size, T[] src2, int[] indices, T[] dest, T zero) Computes the matrix-vector multiplication between a sparse CSR matrix and a sparse COO vector. -
Uses of Shape in org.flag4j.linalg.solvers.exact
Modifier and TypeMethodDescriptionprotected Shape
ExactTensorSolver.getOutputShape
(T A, T B, int aRankOriginal) Constructs the shape of the output. -
Uses of Shape in org.flag4j.rng
Modifier and TypeMethodDescriptionRandomDenseTensor.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
Modifier and TypeMethodDescriptionstatic Shape
ArrayUtils.nDArrayShape
(Object nDArray) Infers the shape of a rectangular nD Java array.Modifier and TypeMethodDescriptionstatic void
ValidateParameters.ensureEqualShape
(Shape shape1, Shape shape2) Checks if twoShape
objects are equivalent.static void
ValidateParameters.ensureMatMultShapes
(Shape shape1, Shape shape2) Checks if twoShape
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 providedaxes
are valid with respect to the rank of the givenshape
.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 notstatic String
ErrorMessages.matMultShapeErrMsg
(Shape shape1, Shape shape2) Gets an error message for two matrices with shapes not conducive with matrix multiplication.static int
Recursively validates the shape of the nD array and flattens it into the provided 1D array.static <T> int
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 givenshape
.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.