Table of Contents

Class HouseholderReflection

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

The Householder reflection onto a unit vector e: the transformation that maps a vector a to |a|e.

public sealed class HouseholderReflection
Inheritance
HouseholderReflection
Inherited Members

Remarks

Immutable and safe to share across threads: the vector is copied.

Where a·e is negative, the reflection vector is (a − |a|e)/|a − |a|e|, QuantLib's general form, so a vector opposite e maps to |a|e; QuantLib's near-parallel branches assume a·e positive, so its zero vector for a ∥ −e maps a to −|a|e and its series branch near −e to neither (Divergences/HouseholderOppositeTests.cs).

Constructors

HouseholderReflection(Vector)

Initializes a new instance of the HouseholderReflection class.

public HouseholderReflection(Vector e)

Parameters

e Vector

The unit vector reflected onto, copied.

Exceptions

ArgumentNullException

e is null.

Methods

Evaluate(Vector)

The reflected vector, |a|e.

public Vector Evaluate(Vector a)

Parameters

a Vector

The vector.

Returns

Vector

A new vector.

Exceptions

ArgumentNullException

a is null.

ArgumentException

a is the zero vector, or its size isn't e's.

ReflectionVector(Vector)

The vector v whose Householder transformation maps a to |a|e.

public Vector ReflectionVector(Vector a)

Parameters

a Vector

The vector.

Returns

Vector

A new vector: the zero vector where a is already |a|e to machine precision.

Exceptions

ArgumentNullException

a is null.

ArgumentException

a is the zero vector, or its size isn't e's.