Skip to content

Commit a8b301d

Browse files
committed
chore: add docs
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 59efc06 commit a8b301d

File tree

4 files changed

+969
-3
lines changed

4 files changed

+969
-3
lines changed
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
// TypeScript Version: 4.1
20+
21+
/// <reference types="@stdlib/types"/>
22+
23+
import { Layout, TransposeOperation, OperationSide, MatrixOrientation } from '@stdlib/types/blas';
24+
25+
/**
26+
* Direction indicator.
27+
*
28+
* ## Notes
29+
*
30+
* The direction indicator specifies how `H` is formed from a product of elementary reflectors:
31+
*
32+
* - `'forward'` - `H = H(1) H(2) ... H(k)`
33+
* - `'backward'` - `H = H(k) ... H(2) H(1)`
34+
*/
35+
type Direction = 'forward' | 'backward';
36+
37+
/**
38+
* Interface describing `dlarfb`.
39+
*/
40+
interface Routine {
41+
/**
42+
* Applies a real block reflector `H` or its transpose `H ^ T` to a real `M` by `N` matrix `C`, from either the left or the right.
43+
*
44+
* @param order - storage layout
45+
* @param side - specifies whether `H` or `H ^ T` is applied from the left or right
46+
* @param trans - specifies whether to apply `H` or `H ^ T`
47+
* @param direct - indicates how `H` is formed from a product of elementary reflectors
48+
* @param storev - indicates how the vectors which define the elementary reflectors are stored
49+
* @param M - number of rows of the matrix `C`
50+
* @param N - number of columns of the matrix `C`
51+
* @param K - order of the matrix `T`
52+
* @param V - input matrix
53+
* @param LDV - leading dimension of `V`
54+
* @param T - input matrix
55+
* @param LDT - leading dimension of `T`
56+
* @param C - input/output matrix
57+
* @param LDC - leading dimension of `C`
58+
* @param work - work array
59+
* @param LDWORK - leading dimension of `work`
60+
* @returns updated matrix `C`
61+
*
62+
* @example
63+
* var Float64Array = require( '@stdlib/array/float64' );
64+
*
65+
* var V = new Float64Array( [ 10.0, 40.0, 70.0, 20.0, 50.0, 80.0, 30.0, 60.0, 90.0 ] );
66+
* var T = new Float64Array( [ 1.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0 ] );
67+
* var C = new Float64Array( [ 11.0, 12.0, 13.0, 21.0, 22.0, 23.0, 31.0, 32.0, 33.0 ] );
68+
* var work = new Float64Array( 9 );
69+
*
70+
* dlarfb( 'row-major', 'left', 'transpose', 'forward', 'columns', 3, 3, 3, V, 3, T, 3, C, 3, work, 3 );
71+
*
72+
* // C => <Float64Array>[ -1350.0, -1400.0, -1450.0, -30961.0, -32102.0, -33243.0, -266612.0, -275464.0, -284316.0 ]
73+
*/
74+
( order: Layout, side: OperationSide, trans: TransposeOperation, direct: Direction, storev: MatrixOrientation, M: number, N: number, K: number, V: Float64Array, LDV: number, T: Float64Array, LDT: number, C: Float64Array, LDC: number, work: Float64Array, LDWORK: number ): Float64Array;
75+
76+
/**
77+
* Applies a real block reflector `H` or its transpose `H ^ T` to a real `M` by `N` matrix `C`, from either the left or the right.
78+
*
79+
* @param side - specifies whether `H` or `H ^ T` is applied from the left or right
80+
* @param trans - specifies whether to apply `H` or `H ^ T`
81+
* @param direct - indicates how `H` is formed from a product of elementary reflectors
82+
* @param storev - indicates how the vectors which define the elementary reflectors are stored
83+
* @param M - number of rows of the matrix `C`
84+
* @param N - number of columns of the matrix `C`
85+
* @param K - order of the matrix `T`
86+
* @param V - input matrix
87+
* @param strideV1 - stride of the first dimension of `V`
88+
* @param strideV2 - stride of the second dimension of `V`
89+
* @param offsetV - index offset for `V`
90+
* @param T - input matrix
91+
* @param strideT1 - stride of the first dimension of `T`
92+
* @param strideT2 - stride of the second dimension of `T`
93+
* @param offsetT - index offset for `T`
94+
* @param C - input matrix
95+
* @param strideC1 - stride of the first dimension of `C`
96+
* @param strideC2 - stride of the second dimension of `C`
97+
* @param offsetC - index offset for `C`
98+
* @param work - work array
99+
* @param strideWork1 - stride of the first dimension of `work`
100+
* @param strideWork2 - stride of the second dimension of `work`
101+
* @param offsetWork - index offset for `work`
102+
* @returns updated matrix `C`
103+
*
104+
* @example
105+
* var Float64Array = require( '@stdlib/array/float64' );
106+
*
107+
* var V = new Float64Array( [ 10.0, 40.0, 70.0, 20.0, 50.0, 80.0, 30.0, 60.0, 90.0 ] );
108+
* var T = new Float64Array( [ 1.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0 ] );
109+
* var C = new Float64Array( [ 11.0, 12.0, 13.0, 21.0, 22.0, 23.0, 31.0, 32.0, 33.0 ] );
110+
* var work = new Float64Array( 9 );
111+
*
112+
* dlarfb( 'left', 'transpose', 'forward', 'columns', 3, 3, 3, V, 3, 1, 0, T, 3, 1, 0, C, 3, 1, 0, work, 3, 1, 0 );
113+
*
114+
* // C => <Float64Array>[ -1350.0, -1400.0, -1450.0, -30961.0, -32102.0, -33243.0, -266612.0, -275464.0, -284316.0 ]
115+
*/
116+
ndarray( side: OperationSide, trans: TransposeOperation, direct: Direction, storev: MatrixOrientation, M: number, N: number, K: number, V: Float64Array, strideV1: number, strideV2: number, offsetV: number, T: Float64Array, strideT1: number, strideT2: number, offsetT: number, C: Float64Array, strideC1: number, strideC2: number, offsetC: number, work: Float64Array, strideWork1: number, strideWork2: number, offsetWork: number ): Float64Array;
117+
}
118+
119+
/**
120+
* Applies a real block reflector `H` or its transpose `H ^ T` to a real `M` by `N` matrix `C`, from either the left or the right.
121+
*
122+
* @param order - storage layout
123+
* @param side - specifies whether `H` or `H ^ T` is applied from the left or right
124+
* @param trans - specifies whether to apply `H` or `H ^ T`
125+
* @param direct - indicates how `H` is formed from a product of elementary reflectors
126+
* @param storev - indicates how the vectors which define the elementary reflectors are stored
127+
* @param M - number of rows of the matrix `C`
128+
* @param N - number of columns of the matrix `C`
129+
* @param K - order of the matrix `T`
130+
* @param V - input matrix
131+
* @param LDV - leading dimension of `V`
132+
* @param T - input matrix
133+
* @param LDT - leading dimension of `T`
134+
* @param C - input/output matrix
135+
* @param LDC - leading dimension of `C`
136+
* @param work - work array
137+
* @param LDWORK - leading dimension of `work`
138+
* @returns updated matrix `C`
139+
*
140+
* @example
141+
* var Float64Array = require( '@stdlib/array/float64' );
142+
*
143+
* var V = new Float64Array( [ 10.0, 40.0, 70.0, 20.0, 50.0, 80.0, 30.0, 60.0, 90.0 ] );
144+
* var T = new Float64Array( [ 1.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0 ] );
145+
* var C = new Float64Array( [ 11.0, 12.0, 13.0, 21.0, 22.0, 23.0, 31.0, 32.0, 33.0 ] );
146+
* var work = new Float64Array( 9 );
147+
*
148+
* dlarfb( 'row-major', 'left', 'transpose', 'forward', 'columns', 3, 3, 3, V, 3, T, 3, C, 3, work, 3 );
149+
*
150+
* // C => <Float64Array>[ -1350.0, -1400.0, -1450.0, -30961.0, -32102.0, -33243.0, -266612.0, -275464.0, -284316.0 ]
151+
*
152+
* @example
153+
* var Float64Array = require( '@stdlib/array/float64' );
154+
*
155+
* var V = new Float64Array( [ 10.0, 40.0, 70.0, 20.0, 50.0, 80.0, 30.0, 60.0, 90.0 ] );
156+
* var T = new Float64Array( [ 1.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0 ] );
157+
* var C = new Float64Array( [ 11.0, 12.0, 13.0, 21.0, 22.0, 23.0, 31.0, 32.0, 33.0 ] );
158+
* var work = new Float64Array( 9 );
159+
*
160+
* dlarfb( 'left', 'transpose', 'forward', 'columns', 3, 3, 3, V, 3, 1, 0, T, 3, 1, 0, C, 3, 1, 0, work, 3, 1, 0 );
161+
*
162+
* // C => <Float64Array>[ -1350.0, -1400.0, -1450.0, -30961.0, -32102.0, -33243.0, -266612.0, -275464.0, -284316.0 ]
163+
*/
164+
declare var dlarfb: Routine;
165+
166+
167+
// EXPORTS //
168+
169+
export = dlarfb;

0 commit comments

Comments
 (0)