From Jason Turner

[linalg.algs.blas1.givens.lartg]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpb1xrlz9_/{from.md → to.md} +41 -0
tmp/tmpb1xrlz9_/{from.md → to.md} RENAMED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### Compute Givens rotation <a id="linalg.algs.blas1.givens.lartg">[[linalg.algs.blas1.givens.lartg]]</a>
2
+
3
+ ``` cpp
4
+ template<class Real>
5
+ setup_givens_rotation_result<Real> setup_givens_rotation(Real a, Real b) noexcept;
6
+
7
+ template<class Real>
8
+ setup_givens_rotation_result<complex<Real>>
9
+ setup_givens_rotation(complex<Real> a, complex<Real> b) noexcept;
10
+ ```
11
+
12
+ These functions compute the Givens plane rotation represented by the two
13
+ values c and s such that the 2 x 2 system of equations
14
+ $$\left[ \begin{matrix}
15
+ c & s \\
16
+ -\overline{s} & c \\
17
+ \end{matrix} \right]
18
+ \cdot
19
+ \left[ \begin{matrix}
20
+ a \\
21
+ b \\
22
+ \end{matrix} \right]
23
+ =
24
+ \left[ \begin{matrix}
25
+ r \\
26
+ 0 \\
27
+ \end{matrix} \right]$$
28
+
29
+ holds, where c is always a real scalar, and c² + |s|^2 = 1. That is, c
30
+ and s represent a 2 x 2 matrix, that when multiplied by the right by the
31
+ input vector whose components are a and b, produces a result vector
32
+ whose first component r is the Euclidean norm of the input vector, and
33
+ whose second component is zero.
34
+
35
+ [*Note 1*: These functions correspond to the LAPACK function
36
+ `xLARTG`. — *end note*]
37
+
38
+ *Returns:* `c, s, r`, where `c` and `s` form the Givens plane rotation
39
+ corresponding to the input `a` and `b`, and `r` is the Euclidean norm of
40
+ the two-component vector formed by `a` and `b`.
41
+