.Modelica.Math.Vectors.Utilities.householderReflection

Information

Syntax

Vectors.Utilities.householderReflection(a,u);

Description

Function "householderReflection(a, u)" performs the reflection of vector a about a plane orthogonal to vector u (Householder vector). Algebraically the operation is defined by

b=Q*a

with

Q = I - 2*u*u',

where Q is an orthogonal matrix, i.e.

Q = inv(Q) = Q'

Example

  a = {2, -4, -2, -1};
  u = {0.837, -0.478, -0.239, -0.119};

  householderReflection(a,u);    //  = {-5.0, -0.001, -0.0005, -0.0044}

See also

Utilities.householderVector
Matrices.Utilities.householderReflection
Matrices.Utilities.householderSimilarityTransformation

Interface

function householderReflection
  extends Modelica.Icons.Function;
  import Modelica.Math.Vectors;
  input Real a[:] "Real vector a to be reflected";
  input Real u[size(a, 1)] "householder vector";
  output Real ra[size(u, 1)] "reflexion of a";
end householderReflection;

Revisions


Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39