Uses of Class
org.flag4j.arrays.dense.Vector
Packages that use Vector
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 Vector in org.flag4j.arrays.backend.field_arrays
Methods in org.flag4j.arrays.backend.field_arrays that return Vector -
Uses of Vector in org.flag4j.arrays.dense
Subclasses with type arguments of type Vector in org.flag4j.arrays.denseClasses in org.flag4j.arrays.dense that implement interfaces with type arguments of type VectorModifier and TypeClassDescriptionclass
Instances of this class represents a complex dense matrix backed by adouble[]
array.class
A dense vector backed by a primitive double array.Methods in org.flag4j.arrays.dense that return VectorModifier and TypeMethodDescriptionRingVector.abs()
Computes the element-wise absolute value of this tensor.Adds a real sparse vector to this vector.Computes the vector cross product between two vectors.Computes the element-wise division between two tensors.Vector.flatten()
Flattens tensor to single dimension while preserving order of data.Vector.flatten
(int axis) Flattens a tensor along the specified axis.Matrix.getCol
(int colIdx, int rowStart, int rowEnd) Gets a specified column of this matrix betweenrowStart
(inclusive) androwEnd
(exclusive).Matrix.getDiag()
Extracts the diagonal elements of this matrix and returns them as a vector.Matrix.getDiag
(int diagOffset) Gets the elements of this matrix along the specified diagonal.Matrix.getRow
(int rowIdx, int colStart, int colEnd) Gets a specified row of this matrix betweencolStart
(inclusive) andcolEnd
(exclusive).Joints specified vector with this vector.Vector.makeLikeTensor
(Shape shape, double[] entries) Constructs a tensor of the same type as this tensor with the given the shape and data.Computes matrix-vector multiplication.Computes the matrix-vector product of this matrix and a real sparse vector.Vector.normalize()
Computes a unit vector in the same direction as this vector.Subtracts a real sparse vector from this vector.Vector.T
(int... axes) Computes the transpose of this tensor.Vector.T
(int axis1, int axis2) Computes the transpose of a tensor by exchangingaxis1
andaxis2
.CVector.toReal()
Converts this complex vector to a real vector.Matrix.toVector()
Converts this matrix to an equivalent vector.Tensor.toVector()
Converts this tensor to an equivalent vector.Methods in org.flag4j.arrays.dense with parameters of type VectorModifier 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 the result in this tensor.void
Computes the element-wise sum between two tensors and stores the result in this tensor.Augments a vector to this matrix.Computes the vector cross product between two vectors.static Matrix
Constructs a diagonal matrix from a vector specifying the diagonal elements of the matrix.Computes the element-wise quotient between two tensors.Computes the element-wise division between two tensors.void
Computes the element-wise division between two tensors and stores the result in this tensor.Computes the dot product between two vectors.Computes the element-wise multiplication of two tensors of the same shape.void
Vector.elemMultEq
(Vector b) Computes the element-wise multiplication of two tensors and stores the result in this tensor.Computes the inner product between two vectors.boolean
Vector.isParallel
(Vector b) Checks if a vector is parallel to this vector.boolean
Checks if a vector is perpendicular to this vector.Joints specified vector with this vector.Computes the matrix-vector multiplication between this matrix and a vector.Computes matrix-vector multiplication.Computes the outer product of two vectors.Sets a column of this matrix at the given index to the specified values.Sets a row of this matrix at the given index to the specified values.Stacks two vectors vertically as if they were row vectors to form a matrix with two rows.Stacks two vectors along specified axis.Computes the element-wise difference between two tensors of the same shape.void
Computes the element-wise difference between two vectors of the same shape.void
Computes the element-wise difference between two tensors and stores the result in this tensor.Constructors in org.flag4j.arrays.dense with parameters of type Vector -
Uses of Vector in org.flag4j.arrays.sparse
Methods in org.flag4j.arrays.sparse that return VectorModifier and TypeMethodDescriptionLeft multiplies this permutation matrix to the specified vector.Computes matrix-vector multiplication.Computes matrix-vector multiplication.Right multiplies this permutation matrix to the specified vector.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes.CooVector.toDense()
Converts this sparse tensor to an equivalent dense tensor.Methods in org.flag4j.arrays.sparse with parameters of type VectorModifier and TypeMethodDescriptionComputes the element-wise division of two vectors.Computes the element-wise multiplication between this vector and a real dense vector.static CooVector
Creates a sparse tensor from a dense tensor.Left multiplies this permutation matrix to the specified vector.Right multiplies this permutation matrix to the specified vector. -
Uses of Vector in org.flag4j.linalg.decompositions.svd
Methods in org.flag4j.linalg.decompositions.svd that return VectorModifier and TypeMethodDescriptionSVD.getSingularValues()
Gets the singular values of the last matrix decomposed. -
Uses of Vector in org.flag4j.linalg.ops
Methods in org.flag4j.linalg.ops with parameters of type VectorModifier and TypeMethodDescriptionstatic CVector
Dynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector.static double[]
Dynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector. -
Uses of Vector in org.flag4j.linalg.ops.dense_sparse.coo.real
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real that return VectorModifier and TypeMethodDescriptionstatic Vector
Adds a real dense vector to a real sparse vector.static Vector
Subtracts a real sparse vector from a real dense vector.static Vector
Subtracts a real dense vector from a real sparse vector.Methods in org.flag4j.linalg.ops.dense_sparse.coo.real with parameters of type VectorModifier and TypeMethodDescriptionstatic Vector
Adds a real dense vector to a real sparse vector.static void
Adds a real dense vector to a real sparse vector and stores the result in the first vector.static Matrix
RealDenseSparseMatrixOps.addToEachCol
(CooMatrix src, Vector col) Adds a dense vector to each column as if the vector is a column vector.static Matrix
RealDenseSparseMatrixOps.addToEachRow
(CooMatrix src, Vector row) Adds a dense vector to add to each row as if the vector is a row vector.static CooVector
Compute the element-wise division between a sparse vector and a dense vector.static CooVector
Computes the element-wise multiplication of a real dense vector with a real sparse vector.static Vector
Subtracts a real sparse vector from a real dense vector.static Vector
Subtracts a real dense vector from a real sparse vector.static void
Adds a real dense vector to a real sparse vector and stores the result in the first vector. -
Uses of Vector 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 VectorModifier and TypeMethodDescriptionstatic CVector
RealComplexDenseSparseVectorOps.add
(Vector src1, CooCVector src2) Adds a real dense matrix to a complex sparse matrix.static CVector
RealComplexDenseSparseVectorOps.sub
(Vector src1, CooCVector src2) Subtracts a complex sparse vector from a real dense vector.static CVector
RealComplexDenseSparseVectorOps.sub
(CooCVector src1, Vector src2) Subtracts a complex dense vector from a complex sparse vector. -
Uses of Vector 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 VectorModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractCooFieldVector<?, ?, ?, ?, T> RealFieldDenseCooVectorOps.elemDiv
(AbstractCooFieldVector<?, ?, ?, ?, T> src1, Vector src2) Compute the element-wise division between a sparse vector and a dense vector.static <T extends Field<T>>
AbstractCooFieldVector<?, ?, ?, ?, T> RealFieldDenseCooVectorOps.elemMult
(Vector src1, AbstractCooFieldVector<?, ?, ?, ?, T> src2) Computes the element-wise multiplication of a real dense vector with a complex sparse vector. -
Uses of Vector in org.flag4j.linalg.ops.dense_sparse.csr.real
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real that return VectorModifier and TypeMethodDescriptionstatic Vector
RealCsrDenseMatrixMultiplication.standardVector
(CsrMatrix src1, Vector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real dense vector.Methods in org.flag4j.linalg.ops.dense_sparse.csr.real with parameters of type VectorModifier and TypeMethodDescriptionstatic Vector
RealCsrDenseMatrixMultiplication.standardVector
(CsrMatrix src1, Vector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real dense vector. -
Uses of Vector in org.flag4j.linalg.ops.dense_sparse.csr.real_field_ops
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real_field_ops with parameters of type VectorModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractDenseFieldVector<?, ?, T> RealFieldDenseCsrMatMult.standardVector
(AbstractCsrFieldMatrix<?, ?, ?, T> src1, Vector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex dense vector. -
Uses of Vector in org.flag4j.linalg.ops.dense.real
Methods in org.flag4j.linalg.ops.dense.real with parameters of type VectorModifier and TypeMethodDescriptionstatic Matrix
RealDenseVectorOps.dispatchOuter
(Vector src1, Vector src2) Dispatches an outer product problem to an appropriate implementation based on the size of the vectors involved. -
Uses of Vector in org.flag4j.linalg.ops.sparse.coo.real
Methods in org.flag4j.linalg.ops.sparse.coo.real that return Vector -
Uses of Vector in org.flag4j.linalg.ops.sparse.csr.real
Methods in org.flag4j.linalg.ops.sparse.csr.real that return VectorModifier and TypeMethodDescriptionstatic Vector
RealCsrMatMult.standardVector
(CsrMatrix src1, CooVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real sparse COO vector. -
Uses of Vector in org.flag4j.linalg.ops.sparse.csr.real_complex
Methods in org.flag4j.linalg.ops.sparse.csr.real_complex with parameters of type VectorModifier and TypeMethodDescriptionstatic CMatrix
RealComplexCsrOps.addToEachCol
(CsrCMatrix src1, Vector src2) Adds a vector to each column of a matrix.static CMatrix
RealComplexCsrOps.addToEachRow
(CsrCMatrix src1, Vector src2) Adds a vector to each row of a matrix. -
Uses of Vector in org.flag4j.linalg.solvers.exact
Subclasses with type arguments of type Vector in org.flag4j.linalg.solvers.exactModifier and TypeClassDescriptionclass
Solver for solving a well determined system of linear equations in an exact sense using theLU decomposition.
class
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 VectorModifier and TypeMethodDescriptionprotected Vector
RealExactTensorSolver.initVector
(Tensor B) Initializes vector for equivalent linear matrix equation.protected Vector
RealExactSolver.permuteRows
(Vector b) Permute the rows of a vector using the row permutation matrix from the LU decomposition.Methods in org.flag4j.linalg.solvers.exact with parameters of type VectorModifier and TypeMethodDescriptionprotected Vector
RealExactSolver.permuteRows
(Vector b) Permute the rows of a vector using the row permutation matrix from the LU decomposition.protected Tensor
Wraps solution as a tensor and reshapes to the proper shape. -
Uses of Vector in org.flag4j.linalg.solvers.exact.triangular
Subclasses with type arguments of type Vector in org.flag4j.linalg.solvers.exact.triangularModifier and TypeClassDescriptionclass
This solver solves linear systems of equations where the coefficient matrix in anupper triangular
real dense matrix and the constant vector is a real dense vector or matrix.class
This solver solves linear systems of equations where the coefficient matrix in a lower triangular real dense matrix and the constant vector is a real dense vector.Methods in org.flag4j.linalg.solvers.exact.triangular that return VectorModifier and TypeMethodDescriptionSolves the linear system of equations given by U*x=b where the coefficient matrix U is anupper triangular
matrix.Performs forward substitution for a unit lower triangular matrix L and a vector b.Methods in org.flag4j.linalg.solvers.exact.triangular with parameters of type VectorModifier and TypeMethodDescriptionSolves the linear system of equations given by U*x=b where the coefficient matrix U is anupper triangular
matrix.Performs forward substitution for a unit lower triangular matrix L and a vector b. -
Uses of Vector in org.flag4j.linalg.solvers.lstsq
Subclasses with type arguments of type Vector in org.flag4j.linalg.solvers.lstsqModifier and TypeClassDescriptionclass
This class solves a linear system of equations Ax=b in a least-squares sense. -
Uses of Vector in org.flag4j.linalg.transformations
Methods in org.flag4j.linalg.transformations that return VectorModifier and TypeMethodDescriptionstatic Vector
Computes the vectorv
in of a Householder matrixH=I-2vv
T whereH
is a transformation matrix which reflects a vector across the plane normal tonormal
.Methods in org.flag4j.linalg.transformations with parameters of type VectorModifier and TypeMethodDescriptionstatic Matrix
Givens.get2x2Rotator
(Vector v) Constructs a Givens rotator G of size 2 such that for a vector v = [a, b] we have Gv = [r, 0].static Matrix
Householder.getReflector
(Vector normal) Computes the Householder reflector which describes a reflection through a hyperplane containing the origin which is normal to the specifiednormal
vector.static Matrix
Givens.getRotator
(Vector v, int i) Constructs a Givens rotator G such that for a vector v, Gv = [r1 ... ri ... rn] where ri=0.static Vector
Computes the vectorv
in of a Householder matrixH=I-2vv
T whereH
is a transformation matrix which reflects a vector across the plane normal tonormal
.static void
Householder.leftMultReflector
(Matrix src, Vector householderVector, double alpha, int startCol, int startRow, int endRow) Left multiplies a Householder matrixH=I-
invalid input: '&alpha'vv
T, represented by the vectorv
, to another matrixA
.static Matrix
Constructs a view matrix for a camera at world positioncameraPos
, looking at the pointcenter
whereup
is the direction of the upwards vector in world coordinates.static void
Householder.rightMultReflector
(Matrix src, Vector householderVector, double alpha, int startCol, int startRow, int endRow) Right multiplies a Householder matrixH=I-
invalid input: '&alpha'vv
T, represented by the vectorv
, to another matrixA
.static Matrix
Constructs a 3D rotation matrix, Ru(θ), which representing a rotation of θ degrees about an axis unit vector u. -
Uses of Vector in org.flag4j.rng
Methods in org.flag4j.rng that return VectorModifier and TypeMethodDescriptionRandomDenseTensor.randnVector
(int size) Generates a vector filled with pseudorandom values sampled from a normal distribution with mean of 0.0 and standard deviation of 1.0.RandomDenseTensor.randnVector
(int size, double mean, double std) Generates a vector filled with pseudorandom values sampled from a normal distribution with specified mean and standard deviation.RandomDenseTensor.randomVector
(int size) Generates a vector filled with pseudorandom values uniformly distributed in[0, 1)
.RandomDenseTensor.randomVector
(int size, double min, double max) Generates a vector filled with pseudorandom values uniformly distributed in[min, max)
.