You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
27
27
*
28
+
* `H` is a Householder matrix with the form:
29
+
*
30
+
* ```tex
31
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
32
+
* ```
33
+
*
34
+
* where:
35
+
*
36
+
* - `tau` is a scalar
37
+
* - `X` is a vector of length `N-1`
38
+
* - `beta` is a scalar value
39
+
* - `H` is an orthogonal matrix known as a Householder reflector.
40
+
*
41
+
* The reflector `H` is constructed in the form:
42
+
*
43
+
* ```tex
44
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
45
+
* ```
46
+
*
47
+
* where:
48
+
*
49
+
* - `tau` is a real scalar
50
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
51
+
* - The vector `[1; V]` is the Householder direction\
52
+
*
53
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
54
+
*
55
+
* ## Special cases
56
+
*
57
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
58
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
59
+
*
28
60
* ## Notes
29
61
*
30
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
31
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
32
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
33
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
34
-
* - otherwise, `1 <= tau <= 2`
62
+
* - `X` should have `N-1` indexed elements
63
+
* - The output array contains the following two elements: `alpha` and `tau`
35
64
*
36
65
* @param N - number of rows/columns of the elementary reflector `H`
37
-
* @param X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
66
+
* @param X - input vector
38
67
* @param incx - stride length for `X`
39
-
* @param out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
40
-
* @returns overwrites the array `X` and `out` in place
68
+
* @param out - output array
41
69
*
42
70
* @example
43
71
* var Float64Array = require( '@stdlib/array/float64' );
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
83
+
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X` using alternative indexing semantics.
84
+
*
85
+
* `H` is a Householder matrix with the form:
86
+
*
87
+
* ```tex
88
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
89
+
* ```
90
+
*
91
+
* where:
92
+
*
93
+
* - `tau` is a scalar
94
+
* - `X` is a vector of length `N-1`
95
+
* - `beta` is a scalar value
96
+
* - `H` is an orthogonal matrix known as a Householder reflector.
97
+
*
98
+
* The reflector `H` is constructed in the form:
99
+
*
100
+
* ```tex
101
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
102
+
* ```
103
+
*
104
+
* where:
105
+
*
106
+
* - `tau` is a real scalar
107
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
108
+
* - The vector `[1; V]` is the Householder direction\
109
+
*
110
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
111
+
*
112
+
* ## Special cases
113
+
*
114
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
115
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
56
116
*
57
117
* ## Notes
58
118
*
59
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
60
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
61
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
62
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
63
-
* - otherwise, `1 <= tau <= 2`
119
+
* - `X` should have `N-1` indexed elements
120
+
* - The output array contains the following two elements: `alpha` and `tau`
64
121
*
65
122
* @param N - number of rows/columns of the elementary reflector `H`
66
-
* @param X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
123
+
* @param X - input vector
67
124
* @param strideX - stride length for `X`
68
125
* @param offsetX - starting index of `X`
69
-
* @param out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
126
+
* @param out - output array
70
127
* @param strideOut - stride length for `out`
71
128
* @param offsetOut - starting index of `out`
72
-
* @returns overwrites the array `X` and `out` in place
73
129
*
74
130
* @example
75
131
* var Float64Array = require( '@stdlib/array/float64' );
@@ -87,19 +143,47 @@ interface Routine {
87
143
/**
88
144
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
89
145
*
146
+
* `H` is a Householder matrix with the form:
147
+
*
148
+
* ```tex
149
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
150
+
* ```
151
+
*
152
+
* where:
153
+
*
154
+
* - `tau` is a scalar
155
+
* - `X` is a vector of length `N-1`
156
+
* - `beta` is a scalar value
157
+
* - `H` is an orthogonal matrix known as a Householder reflector.
158
+
*
159
+
* The reflector `H` is constructed in the form:
160
+
*
161
+
* ```tex
162
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
163
+
* ```
164
+
*
165
+
* where:
166
+
*
167
+
* - `tau` is a real scalar
168
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
169
+
* - The vector `[1; V]` is the Householder direction\
170
+
*
171
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
172
+
*
173
+
* ## Special cases
174
+
*
175
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
176
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
177
+
*
90
178
* ## Notes
91
179
*
92
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
93
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
94
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
95
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
96
-
* - otherwise, `1 <= tau <= 2`
180
+
* - `X` should have `N-1` indexed elements
181
+
* - The output array contains the following two elements: `alpha` and `tau`
97
182
*
98
183
* @param N - number of rows/columns of the elementary reflector `H`
99
-
* @param X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
184
+
* @param X - input vector
100
185
* @param incx - stride length for `X`
101
-
* @param out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
102
-
* @returns overwrites the array `X` and `out` in place
186
+
* @param out - output array
103
187
*
104
188
* @example
105
189
* var Float64Array = require( '@stdlib/array/float64' );
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/lapack/base/dlarfg/lib/base.js
+36-7Lines changed: 36 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -33,20 +33,49 @@ var dlapy2 = require( '@stdlib/lapack/base/dlapy2' );
33
33
/**
34
34
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
35
35
*
36
+
* `H` is a Householder matrix with the form:
37
+
*
38
+
* ```tex
39
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
40
+
* ```
41
+
*
42
+
* where:
43
+
*
44
+
* - `tau` is a scalar
45
+
* - `X` is a vector of length `N-1`
46
+
* - `beta` is a scalar value
47
+
* - `H` is an orthogonal matrix known as a Householder reflector.
48
+
*
49
+
* The reflector `H` is constructed in the form:
50
+
*
51
+
* ```tex
52
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
53
+
* ```
54
+
*
55
+
* where:
56
+
*
57
+
* - `tau` is a real scalar
58
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
59
+
* - The vector `[1; V]` is the Householder direction\
60
+
*
61
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
62
+
*
63
+
* ## Special cases
64
+
*
65
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
66
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
67
+
*
36
68
* ## Notes
37
69
*
38
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
39
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
40
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
41
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
42
-
* - otherwise, `1 <= tau <= 2`
70
+
* - `X` should have `N-1` indexed elements
71
+
* - The output array contains the following two elements: `alpha` and `tau`
43
72
*
44
73
* @private
45
74
* @param {NonNegativeInteger} N - number of rows/columns of the elementary reflector `H`
46
-
* @param {Float64Array} X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
75
+
* @param {Float64Array} X - input vector
47
76
* @param {integer} strideX - stride length for `X`
48
77
* @param {NonNegativeInteger} offsetX - starting index of `X`
49
-
* @param {Float64Array} out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
78
+
* @param {Float64Array} out - output array
50
79
* @param {integer} strideOut - stride length for `out`
51
80
* @param {NonNegativeInteger} offsetOut - starting index of `out`
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/lapack/base/dlarfg/lib/dlarfg.js
+36-7Lines changed: 36 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -28,18 +28,47 @@ var base = require( './base.js' );
28
28
/**
29
29
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
30
30
*
31
+
* `H` is a Householder matrix with the form:
32
+
*
33
+
* ```tex
34
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
35
+
* ```
36
+
*
37
+
* where:
38
+
*
39
+
* - `tau` is a scalar
40
+
* - `X` is a vector of length `N-1`
41
+
* - `beta` is a scalar value
42
+
* - `H` is an orthogonal matrix known as a Householder reflector.
43
+
*
44
+
* The reflector `H` is constructed in the form:
45
+
*
46
+
* ```tex
47
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
48
+
* ```
49
+
*
50
+
* where:
51
+
*
52
+
* - `tau` is a real scalar
53
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
54
+
* - The vector `[1; V]` is the Householder direction\
55
+
*
56
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
57
+
*
58
+
* ## Special cases
59
+
*
60
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
61
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
62
+
*
31
63
* ## Notes
32
64
*
33
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
34
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
35
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
36
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
37
-
* - otherwise, `1 <= tau <= 2`
65
+
* - `X` should have `N-1` indexed elements
66
+
* - The output array contains the following two elements: `alpha` and `tau`
38
67
*
39
68
* @param {NonNegativeInteger} N - number of rows/columns of the elementary reflector `H`
40
-
* @param {Float64Array} X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
69
+
* @param {Float64Array} X - input vector
41
70
* @param {integer} incx - stride length for `X`
42
-
* @param {Float64Array} out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/lapack/base/dlarfg/lib/ndarray.js
+38-8Lines changed: 38 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -26,21 +26,51 @@ var base = require( './base.js' );
26
26
// MAIN //
27
27
28
28
/**
29
-
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X` using alternative indexing semantics.
29
+
* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X` usinig alternative indexing semantics.
30
+
*
31
+
* `H` is a Householder matrix with the form:
32
+
*
33
+
* ```tex
34
+
* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
35
+
* ```
36
+
*
37
+
* where:
38
+
*
39
+
* - `tau` is a scalar
40
+
* - `X` is a vector of length `N-1`
41
+
* - `beta` is a scalar value
42
+
* - `H` is an orthogonal matrix known as a Householder reflector.
43
+
*
44
+
* The reflector `H` is constructed in the form:
45
+
*
46
+
* ```tex
47
+
* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
48
+
* ```
49
+
*
50
+
* where:
51
+
*
52
+
* - `tau` is a real scalar
53
+
* - `V` is a real vector of length `N-1` that defines the Householder vector
54
+
* - The vector `[1; V]` is the Householder direction\
55
+
*
56
+
* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I`
57
+
*
58
+
* ## Special cases
59
+
*
60
+
* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix.
61
+
* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations.
30
62
*
31
63
* ## Notes
32
64
*
33
-
* - `H` is a Householder matrix with the form `H = I - tau * [1; V] * [1, V^T]`, where `tau` is a scalar and `V` is a vector.
34
-
* - the input vector is `[alpha; X]`, where `alpha` is a scalar and `X` is a real `(n-1)`-element vector.
35
-
* - the result of applying `H` to `[alpha; X]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
36
-
* - if all elements of `X` are zero, then `tau = 0` and `H` is the identity matrix.
37
-
* - otherwise, `1 <= tau <= 2`
65
+
* - `X` should have `N-1` indexed elements
66
+
* - The output array contains the following two elements: `alpha` and `tau`
67
+
38
68
*
39
69
* @param {NonNegativeInteger} N - number of rows/columns of the elementary reflector `H`
40
-
* @param {Float64Array} X - overwritten by the vector `V` on exit, expects `N - 1` indexed elements
70
+
* @param {Float64Array} X - input vector
41
71
* @param {integer} strideX - stride length for `X`
42
72
* @param {NonNegativeInteger} offsetX - starting index of `X`
43
-
* @param {Float64Array} out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
73
+
* @param {Float64Array} out - output array
44
74
* @param {integer} strideOut - stride length for `out`
45
75
* @param {NonNegativeInteger} offsetOut - starting index of `out`
0 commit comments