public class VectorVectorMult_DDRM
extends java.lang.Object
Constructor and Description 

VectorVectorMult_DDRM() 
Modifier and Type  Method and Description 

static void 
addOuterProd(double gamma,
DMatrixD1 x,
DMatrixD1 y,
DMatrix1Row A)
Adds to A ∈ ℜ ^{m × n} the results of an outer product multiplication
of the two vectors.

static void 
householder(double gamma,
DMatrixD1 u,
DMatrixD1 x,
DMatrixD1 y)
Multiplies a householder reflection against a vector:
y = (I + γ u u^{T})x 
static double 
innerProd(DMatrixD1 x,
DMatrixD1 y)
Computes the inner product of the two vectors.

static double 
innerProdA(DMatrixD1 x,
DMatrixD1 A,
DMatrixD1 y)
return = x^{T}*A*y

static double 
innerProdTranA(DMatrixD1 x,
DMatrixD1 A,
DMatrixD1 y)
x^{T}A^{T}y

static void 
outerProd(DMatrixD1 x,
DMatrixD1 y,
DMatrix1Row A)
Sets A ∈ ℜ ^{m × n} equal to an outer product multiplication of the two
vectors.

static void 
rank1Update(double gamma,
DMatrixRMaj A,
DMatrixRMaj u,
DMatrixRMaj w)
Performs a rank one update on matrix A using vectors u and w.

static void 
rank1Update(double gamma,
DMatrixRMaj A,
DMatrixRMaj u,
DMatrixRMaj w,
DMatrixRMaj B)
Performs a rank one update on matrix A using vectors u and w.

public static double innerProd(DMatrixD1 x, DMatrixD1 y)
Computes the inner product of the two vectors. In geometry this is known as the dot product.
∑_{k=1:n} x_{k} * y_{k}
where x and y are vectors with n elements.
These functions are often used inside of highly optimized code and therefor sanity checks are kept to a minimum. It is not recommended that any of these functions be used directly.
x
 A vector with n elements. Not modified.y
 A vector with n elements. Not modified.public static double innerProdA(DMatrixD1 x, DMatrixD1 A, DMatrixD1 y)
return = x^{T}*A*y
x
 A vector with n elements. Not modified.A
 A matrix with n by m elements. Not modified.y
 A vector with m elements. Not modified.public static double innerProdTranA(DMatrixD1 x, DMatrixD1 A, DMatrixD1 y)
x^{T}A^{T}y
x
 A vector with n elements. Not modified.A
 A matrix with n by n elements. Not modified.y
 A vector with n elements. Not modified.public static void outerProd(DMatrixD1 x, DMatrixD1 y, DMatrix1Row A)
Sets A ∈ ℜ ^{m × n} equal to an outer product multiplication of the two
vectors. This is also known as a rank1 operation.
A = x * y'
where x ∈ ℜ ^{m} and y ∈ ℜ ^{n} are vectors.
Which is equivalent to: A_{ij} = x_{i}*y_{j}
These functions are often used inside of highly optimized code and therefor sanity checks are kept to a minimum. It is not recommended that any of these functions be used directly.
x
 A vector with m elements. Not modified.y
 A vector with n elements. Not modified.A
 A Matrix with m by n elements. Modified.public static void addOuterProd(double gamma, DMatrixD1 x, DMatrixD1 y, DMatrix1Row A)
Adds to A ∈ ℜ ^{m × n} the results of an outer product multiplication
of the two vectors. This is also known as a rank 1 update.
A = A + γ x * y^{T}
where x ∈ ℜ ^{m} and y ∈ ℜ ^{n} are vectors.
Which is equivalent to: A_{ij} = A_{ij} + γ x_{i}*y_{j}
These functions are often used inside of highly optimized code and therefor sanity checks are kept to a minimum. It is not recommended that any of these functions be used directly.
gamma
 A multiplication factor for the outer product.x
 A vector with m elements. Not modified.y
 A vector with n elements. Not modified.A
 A Matrix with m by n elements. Modified.public static void householder(double gamma, DMatrixD1 u, DMatrixD1 x, DMatrixD1 y)
Multiplies a householder reflection against a vector:
y = (I + γ u u^{T})x
The Householder reflection is used in some implementations of QR decomposition.
u
 A vector. Not modified.x
 a vector. Not modified.y
 Vector where the result are written to.public static void rank1Update(double gamma, DMatrixRMaj A, DMatrixRMaj u, DMatrixRMaj w, DMatrixRMaj B)
Performs a rank one update on matrix A using vectors u and w. The results are stored in B.
B = A + γ u w^{T}
This is called a rank1 update because the matrix u w^{T} has a rank of 1. Both A and B can be the same matrix instance, but there is a special rank1Update for that.
gamma
 A scalar.A
 A m by m matrix. Not modified.u
 A vector with m elements. Not modified.w
 A vector with m elements. Not modified.B
 A m by m matrix where the results are stored. Modified.public static void rank1Update(double gamma, DMatrixRMaj A, DMatrixRMaj u, DMatrixRMaj w)
Performs a rank one update on matrix A using vectors u and w. The results are stored in A.
A = A + γ u w^{T}
This is called a rank1 update because the matrix u w^{T} has a rank of 1.
gamma
 A scalar.A
 A m by m matrix. Modified.u
 A vector with m elements. Not modified.
Copyright © 20092018 Peter Abeles