Uses of Class
org.flag4j.arrays.sparse.CooTensor
Package
Description
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
-
Uses of CooTensor in org.flag4j.arrays.backend.field_arrays
-
Uses of CooTensor in org.flag4j.arrays.dense
Modifier and TypeMethodDescriptionComputes the element-wise multiplication between two tensors.Tensor.toCoo()
Converts this tensor to an equivalent sparse COO tensor.Tensor.toCoo
(double estimatedSparsity) Converts this tensor to an equivalent sparse COO tensor.Modifier and TypeMethodDescriptionComputes the element-wise sum between two tensors of the same shape.Computes the element-wise sum between two tensors of the same shape.Computes the element-wise multiplication of two tensors of the same shape.Computes the element-wise multiplication between two tensors.Computes the element-wise difference between two tensors of the same shape.Computes the element-wise difference between two tensors of the same shape. -
Uses of CooTensor in org.flag4j.arrays.sparse
Modifier and TypeClassDescriptionclass
A real sparse tensor stored in coordinate list (COO) format.Modifier and TypeMethodDescriptionCooRingTensor.abs()
Computes the element-wise absolute value of this tensor.CooTensor.add
(double b) Adds a scalar value to each non-zero value of this tensor.Adds a scalar field value to each non-zero entry of this tensor.Computes the element-wise sum between two tensors of the same shape.CooTensor.coalesce()
Coalesces this sparse COO tensor.CooTensor.coalesce
(BinaryOperator<Double> aggregator) Coalesces this sparse COO tensor.CooTensor.copy()
Creates a deep copy of this tensor.Computes the element-wise quotient between two tensors.CooTensor.dropZeros()
Drops any explicit zeros in this sparse COO tensor.Computes the element-wise multiplication of two tensors of the same shape.CooTensor.flatten()
Flattens tensor to single dimension while preserving order of data.CooTensor.flatten
(int axis) Flattens a tensor along the specified axis.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.CooTensor.recip()
Computes the element-wise reciprocals of the non-zero elements of this sparse tensor.Copies and reshapes this tensor.Sets the element of this tensor at the specified indices.CooTensor.sub
(double b) Subtracts a scalar value from each non-zero value of this tensor.Subtracts a scalar value from each non-zero entry of this tensor.Computes the element-wise difference between two tensors of the same shape.CooTensor.T
(int... axes) Computes the transpose of this tensor.CooTensor.T
(int axis1, int axis2) Computes the transpose of a tensor by exchangingaxis1
andaxis2
.CooTensor.tensorTr
(int axis1, int axis2) Computes the generalized trace of this tensor along the specified axes.CsrMatrix.tensorTr
(int axis1, int axis2) Computes the generalized trace of this tensor along the specified axes.CooCTensor.toReal()
Converts this complex vector to a real vector.CooMatrix.toTensor()
Converts this sparse COO matrix to an equivalentsparse COO tensor
.CooVector.toTensor()
Converts this sparse vector to an equivalent tensor.CsrMatrix.toTensor()
Converts this sparse CSR matrix to an equivalent sparse COO tensor.Modifier and TypeMethodDescriptionComputes the element-wise sum between two tensors of the same shape.Computes the element-wise quotient between two tensors.Computes the element-wise multiplication of two tensors of the same shape.Computes the element-wise difference between two tensors of the same shape.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes. -
Uses of CooTensor in org.flag4j.linalg.ops.dense_sparse.coo.real
Modifier and TypeMethodDescriptionstatic CooTensor
Computes the element-wise division between a real dense tensor and a real sparse tensor.static CooTensor
Computes the element-wise multiplication between a real dense tensor and a real sparse tensor.Modifier and TypeMethodDescriptionstatic Tensor
Adds a real dense tensor to a real sparse tensor.static Tensor
Adds a scalar to a real sparse COO tensor.static void
Adds a real dense tensor to a real sparse tensor and stores the result in the first tensor.static CooTensor
Computes the element-wise division between a real dense tensor and a real sparse tensor.static CooTensor
Computes the element-wise multiplication between a real dense tensor and a real sparse tensor.static Tensor
Subtracts a real sparse tensor from a real dense tensor.static Tensor
Subtracts a scalar from each entry of a real sparse COO tensor.static Tensor
Subtracts a real dense tensor from a real sparse tensor.static void
Subtracts a real sparse tensor from a real dense tensor and stores the result in the dense tensor.static boolean
RealDenseSparseEquals.tensorEquals
(Tensor A, CooTensor B) Checks if a real dense tensor is equal to a real sparse tensor. -
Uses of CooTensor in org.flag4j.linalg.ops.dense_sparse.coo.real_complex
Modifier and TypeMethodDescriptionstatic CTensor
RealComplexDenseCooOps.add
(CooTensor src1, Complex128 b) Adds a scalar to a real sparse COO tensor.static CooCTensor
Computes the element-wise division between a real dense tensor and a complex sparse tensor.static CooCTensor
Computes the element-wise multiplication between a complex dense tensor and a real sparse matrix.static CTensor
RealComplexDenseCooOps.sub
(CooTensor src1, Complex128 b) Subtracts a scalar from a real sparse COO tensor.static boolean
RealComplexDenseSparseEquals.tensorEquals
(CTensor A, CooTensor B) Checks if a complex dense tensor is equal to a real sparse tensor. -
Uses of CooTensor in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractDenseFieldTensor<?, T> RealFieldDenseCooOps.add
(AbstractDenseFieldTensor<?, T> src1, CooTensor src2) Adds a dense complex tensor to a real sparse tensor.static <T extends Field<T>>
voidRealFieldDenseCooOps.addEq
(AbstractDenseFieldTensor<?, T> src1, CooTensor src2) Computes element-wise addition between a complex dense tensor and a real sparse tensor.static <T extends Field<T>>
voidRealFieldDenseCooOps.elemMult
(AbstractDenseFieldTensor<?, T> src1, CooTensor src2, T[] destEntries, int[][] destIndices) Computes the element-wise multiplication between a real dense tensor and a complex sparse tensor.static <T extends Field<T>>
AbstractDenseFieldTensor<?, T> RealFieldDenseCooOps.sub
(AbstractDenseFieldTensor<?, T> src1, CooTensor src2) Adds a dense complex tensor to a real sparse tensor.static <T extends Field<T>>
AbstractDenseFieldTensor<?, T> RealFieldDenseCooOps.sub
(CooTensor src1, AbstractDenseFieldTensor<?, T> src2) Subtracts a complex dense tensor from a real sparse tensor.static <T extends Field<T>>
voidRealFieldDenseCooOps.subEq
(AbstractDenseFieldTensor<?, T> src1, CooTensor src2) Computes element-wise subtraction between a complex dense tensor and a real sparse tensor. -
Uses of CooTensor in org.flag4j.linalg.ops.sparse.coo.real
Modifier and TypeMethodDescriptionstatic CooTensor
Sums two sparse COO tensors and stores result in a new COO tensor.static CooTensor
Computes the element-wise multiplication between two sparse COO tensors.static CooTensor
Computes difference between two sparse COO tensors and stores result in a new COO tensor.Modifier and TypeMethodDescriptionstatic CooTensor
Sums two sparse COO tensors and stores result in a new COO tensor.static boolean
RealSparseEquals.allCloseTensor
(CooTensor src1, CooTensor src2, double relTol, double absTol) Checks that all non-zero data are "close" according toRealProperties.allClose(double[], double[], double, double)
and all indices are the same.static boolean
RealSparseEquals.cooTensorEquals
(CooTensor a, CooTensor b) Checks if two real sparse tensors are real.static CooTensor
Computes the element-wise multiplication between two sparse COO tensors.static CooTensor
Computes difference between two sparse COO tensors and stores result in a new COO tensor.static Tensor
Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes. -
Uses of CooTensor in org.flag4j.linalg.ops.sparse.coo.real_complex
Modifier and TypeMethodDescriptionstatic CooCTensor
RealComplexCooTensorOps.add
(CooCTensor src1, CooTensor src2) Sums two sparse COO tensors and stores result in a new COO tensor.static CooCTensor
RealComplexCooTensorOps.elemMult
(CooCTensor src1, CooTensor src2) Computes the element-wise multiplication between two sparse COO tensors.static CooCTensor
RealComplexCooTensorOps.elemMult
(CooTensor src1, CooCTensor src2) Computes the element-wise multiplication between two sparse COO tensors.static CooCTensor
RealComplexCooTensorOps.sub
(CooCTensor src1, CooTensor src2) Computes difference of two sparse COO tensors and stores result in a new COO tensor.static CooCTensor
RealComplexCooTensorOps.sub
(CooTensor src1, CooCTensor src2) Computes difference of two sparse COO tensors and stores result in a new COO tensor.static boolean
RealComplexSparseEquals.tensorEquals
(CooTensor a, CooCTensor b) Checks if a real sparse tensor and complex sparse tensor are equal.