Uses of Class
org.flag4j.arrays.dense.Tensor
Packages that use Tensor
Package
Description
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
This package contains classes for Pseudo-random generation of real/complex numbers, and arrays, vectors,
matrices, and tensors.
-
Uses of Tensor in org.flag4j.arrays.backend.primitive_arrays
Methods in org.flag4j.arrays.backend.primitive_arrays that return Tensor -
Uses of Tensor in org.flag4j.arrays.dense
Subclasses with type arguments of type Tensor in org.flag4j.arrays.denseModifier and TypeClassDescriptionclass
A real dense tensor backed by a primitive double array.Methods in org.flag4j.arrays.dense that return TensorModifier and TypeMethodDescriptionFieldTensor.abs()
Computes the element-wise absolute value of this tensor.RingTensor.abs()
Computes the element-wise absolute value of this tensor.Computes the element-wise sum between two tensors of the same shape.Tensor.flatten()
Flattens tensor to single dimension while preserving order of data.Tensor.flatten
(int axis) Flattens a tensor along the specified axis.Tensor.makeLikeTensor
(Shape shape, double[] entries) Constructs a tensor of the same type as this tensor with the given the shape and data.Computes the element-wise difference between two tensors of the same shape.CTensor.toReal()
Converts this complex tensor to a real tensor.Matrix.toTensor()
Converts this matrix to an equivalentTensor
.Vector.toTensor()
Converts this vector to an equivalent tensor.Methods in org.flag4j.arrays.dense with parameters of type TensorModifier and TypeMethodDescriptionComputes the element-wise sum between two tensors of the same shape.void
Computes the element-wise sum between two tensors of the same shape and stores hte result in this tensor.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.void
Computes the element-wise difference of this tensor with a real dense tensor and stores the result in this tensor.Constructors in org.flag4j.arrays.dense with parameters of type Tensor -
Uses of Tensor in org.flag4j.arrays.sparse
Methods in org.flag4j.arrays.sparse that return TensorModifier 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.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes.CooTensor.toDense()
Converts this sparse tensor to an equivalent dense tensor. -
Uses of Tensor in org.flag4j.linalg
Methods in org.flag4j.linalg that return TensorMethods in org.flag4j.linalg with parameters of type Tensor -
Uses of Tensor in org.flag4j.linalg.ops.dense_sparse.coo.real
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real that return TensorModifier 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 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.Methods in org.flag4j.linalg.ops.dense_sparse.coo.real with parameters of type TensorModifier and TypeMethodDescriptionstatic Tensor
Adds a real dense tensor to a real sparse 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 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 Tensor in org.flag4j.linalg.ops.dense_sparse.coo.real_complex
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real_complex with parameters of type TensorModifier and TypeMethodDescriptionstatic CooCTensor
RealComplexDenseCooOps.elemMult
(Tensor src1, CooCTensor src2) Computes the element-wise multiplication between a complex dense tensor and a real sparse matrix.static CTensor
RealComplexDenseCooOps.sub
(Tensor src1, CooCTensor src2) Subtracts a sparse complex tensor from a real dense tensor.static CTensor
RealComplexDenseCooOps.sub
(CooCTensor src1, Tensor src2) Subtracts a real dense tensor from a complex sparse tensor.static boolean
RealComplexDenseSparseEquals.tensorEquals
(Tensor A, CooCTensor B) Checks if a real dense tensor is equal to a complex sparse tensor. -
Uses of Tensor in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops with parameters of type TensorModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractCooFieldTensor<?, ?, T> RealFieldDenseCooOps.elemDiv
(AbstractCooFieldTensor<?, ?, T> src1, Tensor src2) Computes the element-wise division between a real dense tensor and a real sparse tensor.static <T extends Field<T>>
AbstractCooFieldTensor<?, ?, T> RealFieldDenseCooOps.elemMult
(Tensor src1, AbstractCooFieldTensor<?, ?, T> src2) Computes the element-wise multiplication between a real dense tensor and a complex sparse tensor. -
Uses of Tensor in org.flag4j.linalg.ops.dense.real
Methods in org.flag4j.linalg.ops.dense.real with parameters of type TensorModifier and TypeMethodDescriptionstatic boolean
RealDenseEquals.tensorEquals
(Tensor A, Tensor B) Checks if two real dense tensors are equal. -
Uses of Tensor in org.flag4j.linalg.ops.dense.real_field_ops
Methods in org.flag4j.linalg.ops.dense.real_field_ops with parameters of type TensorModifier and TypeMethodDescriptionstatic <T extends Field<T>>
booleanRealFieldDenseEquals.tensorEquals
(Tensor A, AbstractDenseFieldTensor<?, T> B) Checks if two real dense tensors are equal. -
Uses of Tensor in org.flag4j.linalg.ops.sparse.coo.real
Methods in org.flag4j.linalg.ops.sparse.coo.real that return Tensor -
Uses of Tensor in org.flag4j.linalg.solvers.exact
Subclasses with type arguments of type Tensor in org.flag4j.linalg.solvers.exactModifier and TypeClassDescriptionclass
Solver for solving a real well determined linear tensor equation A*X=B in an exact sense.Methods in org.flag4j.linalg.solvers.exact that return TensorModifier and TypeMethodDescriptionprotected Tensor
Wraps solution as a tensor and reshapes to the proper shape.Methods in org.flag4j.linalg.solvers.exact with parameters of type TensorModifier and TypeMethodDescriptionprotected Matrix
RealExactTensorSolver.initMatrix
(Tensor A, int prod) Initializes matrix for equivalent linear matrix equation.protected Vector
RealExactTensorSolver.initVector
(Tensor B) Initializes vector for equivalent linear matrix equation. -
Uses of Tensor in org.flag4j.rng
Methods in org.flag4j.rng that return TensorModifier and TypeMethodDescriptionRandomDenseTensor.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.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)
.