Class HouseholderContext
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.operation.householder.HouseholderContext
-
public class HouseholderContext extends Object
This is the context information about a Householder transformation. It tells- v, the defining vector which is perpendicular to the Householder hyperplane;
- generator, the vector used to generate the Householder defining vector;
- λ, the norm of the generator with the sign chosen to be the opposite of the first coordinate of generator.
-
-
Field Summary
Fields Modifier and Type Field Description double
beta
β = 2 / v'v.Vector
generator
The vector which is used to generate the Householder vector.double
lambda
The norm of the generator with the sign chosen to be the opposite of the first coordinate of the generator.Vector
v
The defining vector which is perpendicular to the Householder hyperplane.
-
Constructor Summary
Constructors Constructor Description HouseholderContext(Vector v, double beta, Vector generator, double lambda)
Constructs a Householder context information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HouseholderContext
getContext(Vector x)
Generates the context information from a generating vector x.String
toString()
-
-
-
Field Detail
-
v
public final Vector v
The defining vector which is perpendicular to the Householder hyperplane.
-
beta
public final double beta
β = 2 / v'v.
-
generator
public final Vector generator
The vector which is used to generate the Householder vector.
-
lambda
public final double lambda
The norm of the generator with the sign chosen to be the opposite of the first coordinate of the generator.
-
-
Constructor Detail
-
HouseholderContext
public HouseholderContext(Vector v, double beta, Vector generator, double lambda)
Constructs a Householder context information.- Parameters:
v
- the defining vector which is perpendicular to the Householder hyperplanebeta
- βgenerator
- the vector that generates the Householder reflectionlambda
- λ, the negative norm of the generator
-
-
Method Detail
-
getContext
public static HouseholderContext getContext(Vector x)
Generates the context information from a generating vector x. Given a vector x, return a vector v, such that
That is,Hx = ±||x|| * e1
H.reflect(x) == new DenseVector(new double[]{±x.norm(), 0, ...})
- Parameters:
x
- a vector- Returns:
- the context information for a Householder transformation
-
-