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.
Provides implementations of the singular value decomposition for real and complex matrices.
General linear algebra operations.
Implementations of operations on real dense array objects.
Implementations of operations on real sparse COO (coordinate) array objects.
Contains solvers which solve well determined linear tensor and matrix equations in an exact sense.
Contains solvers which solve well determined triangular linear matrix equations in an exact sense.
Solvers for under-, well-, or over-determined linear systems in a least-squares sense.
Utility classes for computing and applying matrix and vector transformations.
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.Multiplies this sparse CSR matrix with a real dense vector.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.Computes the matrix-vector multiplication of a vector with this matrix.Multiplies this sparse CSR matrix with a real dense 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 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
RealCsrDenseMatMult.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
RealCsrDenseMatMult.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.dispatch
Subclasses with type arguments of type Vector in org.flag4j.linalg.ops.dispatchModifier and TypeClassDescriptionfinal class
A dispatcher that selects the most suitable matrix-vector multiplication kernel for a real dense matrix/vector pair.final class
A dispatcher that selects the most suitable matrix-vector multiplication kernel for a real dense matrix/vector pair.Methods in org.flag4j.linalg.ops.dispatch that return VectorModifier and TypeMethodDescriptionstatic Vector
Dispatches the multiplication of two matrices to an appropriate implementation based on the shapes of the two matrices.Methods in org.flag4j.linalg.ops.dispatch that return types with arguments of type VectorModifier and TypeMethodDescriptionprotected BiFunction
<Matrix, Vector, Vector> Computes the appropriate function to use when computing the matrix multiplication between two matrices.protected BiFunction
<Matrix, Vector, Vector> Computes the appropriate function to use when computing the matrix multiplication between two matrices.Methods in org.flag4j.linalg.ops.dispatch with parameters of type Vector -
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
Solves a well determined system of equations \( Ax = b \) or \( AX = B \) in an exact sense by using aLU decomposition
where \( A \), \( B \), and \( X \) are matrices, and \( x \) and \( b \) are vectors.class
Solver for solving a real well determined linear tensor equation \( AX = 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 the form \( Ux = b \) or \( UX = B \) where \( U \) is an upper triangular matrix.class
This solver solves a real linear system of equations where the coefficient matrix is lower triangular.Methods in org.flag4j.linalg.solvers.exact.triangular that return VectorModifier and TypeMethodDescriptionSolves the linear system of equations given by \( Ux = 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 \( Ux = 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
Instances of this class solve real linear systems of the form \( Ax = b \) or \( 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 vector \( v \) in of a Householder matrix \( H = I-2vv^{T} \) where \( H \) 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 \( \mathbf{v} = \begin{bmatrix}a & b\end{bmatrix} \) we have \( G\mathbf{v} = \begin{bmatrix}r & 0\end{bmatrix} \).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 \( \mathbf{v} \), \[ G\mathbf{v} = \begin{bmatrix} r_1 & \cdots & r_i & \cdots r_n \end{bmatrix} \] where \( r_{i} = 0 \).static Vector
Computes the vector \( v \) in of a Householder matrix \( H = I-2vv^{T} \) where \( H \) 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 matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \), to another matrix \( A \).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 matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \), to another matrix \( A \).static Matrix
Constructs a 3D rotation matrix, \( R_{u}\left(\theta \right) \), which representing a rotation of \( \theta \) radians 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)
.