Skip to content

Commit 82af8e9

Browse files
committed
docs: add repl.txt
--- 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: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 4c9b7e9 commit 82af8e9

File tree

3 files changed

+182
-4
lines changed

3 files changed

+182
-4
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
2+
{{alias}}( order, tr, N, r, L, D, U, U2, I, B, LDB )
3+
Solves a system of linear equations with a tri diagonal matrix using
4+
the LU factorization computed by `dgttrf`.
5+
6+
Indexing is relative to the first index. To introduce an offset, use
7+
typed array views.
8+
9+
If `N` is equal to `0`, the function returns `B` unchanged.
10+
11+
Parameters
12+
----------
13+
order: string
14+
Row-major (C-style) or column-major (Fortran-style) order. Must be
15+
either 'row-major' or 'column-major'.
16+
17+
tr: integer
18+
Specifies the form of the system of equations.
19+
20+
N: integer
21+
Order of the matrix `A`.
22+
23+
r: integer
24+
Number of right-hand sides, i.e., the number of columns of the
25+
matrix `B`.
26+
27+
L: Float64Array
28+
Multipliers that define the matrix `L`.
29+
30+
D: Float64Array
31+
Diagonal elements of the upper triangular matrix `U`.
32+
33+
U: Float64Array
34+
Elements of the first super-diagonal of `U`.
35+
36+
U2: Float64Array
37+
Elements of the second super-diagonal of `U`.
38+
39+
I: Int32Array
40+
Array of pivot indices.
41+
42+
B: Float64Array
43+
Right-hand side matrix `B`, overwritten by the solution
44+
matrix `X`.
45+
46+
LDB: integer
47+
Leading dimension of array `B`.
48+
49+
Returns
50+
-------
51+
B: Float64Array
52+
Mutated input matrix.
53+
54+
Examples
55+
--------
56+
> var L = new {{alias:@stdlib/array/float64}}( [ 0.25, 0.26666667 ] );
57+
> var D = new {{alias:@stdlib/array/float64}}([4.0,3.75,3.73333333]);
58+
> var U = new {{alias:@stdlib/array/float64}}( [ 1.0, 0.73333333 ] );
59+
> var U2 = new {{alias:@stdlib/array/float64}}( [ 0.0 ] );
60+
> var B = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 7.0 ] );
61+
> var I = new {{alias:@stdlib/array/int32}}( [ 0, 1, 2 ] );
62+
> var ord = 'column-major';
63+
> {{alias}}( ord, 1, 3, 1, L, D, U, U2, I, B, 3 )
64+
<Float64Array>[ ~1.44, ~1.25, ~1.55 ]
65+
66+
// Using typed array views:
67+
> var L0 = new {{alias:@stdlib/array/float64}}([ 0.0, 0.25, 0.26666667 ]);
68+
> var D0 = new {{alias:@stdlib/array/float64}}([0.0,4.0,3.75,3.73333333]);
69+
> var U0 = new {{alias:@stdlib/array/float64}}([ 0.0, 1.0, 0.73333333 ]);
70+
> var U20 = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0 ] );
71+
> var I0 = new {{alias:@stdlib/array/int32}}( [ 0, 0, 1, 2 ] );
72+
> var B0 = new {{alias:@stdlib/array/float64}}( [ 0.0, 7.0, 8.0, 7.0 ] );
73+
> L = new Float64Array( L0.buffer, L0.BYTES_PER_ELEMENT*1 );
74+
> D = new Float64Array( D0.buffer, D0.BYTES_PER_ELEMENT*1 );
75+
> U = new Float64Array( U0.buffer, U0.BYTES_PER_ELEMENT*1 );
76+
> U2 = new Float64Array( U20.buffer, U20.BYTES_PER_ELEMENT*1 );
77+
> I = new Int32Array( I0.buffer, I0.BYTES_PER_ELEMENT*1 );
78+
> B = new Float64Array( B0.buffer, B0.BYTES_PER_ELEMENT*1 );
79+
> {{alias}}( 'column-major', 1, 3, 1, L, D, U, U2, I, B, 3 );
80+
> B0
81+
<Float64Array>[ 0.0, ~1.44, ~1.25, ~1.55 ]
82+
83+
84+
{{alias}}.ndarray(tr,N,r,L,sl,ol,D,sd,od,U,su,ou,U2,su2,ou2,I,si,oi,B,s1,s2,ob)
85+
Solves a system of linear equations with a tri diagonal matrix using the
86+
LU factorization computed by `dgttrf` and alternative indexing semantics.
87+
88+
While typed array views mandate a view offset based on the underlying
89+
buffer, the offset parameters support indexing semantics based on starting
90+
indices.
91+
92+
Parameters
93+
----------
94+
tr: integer
95+
Specifies the form of the system of equations.
96+
97+
N: integer
98+
Order of the matrix `A`.
99+
100+
r: integer
101+
Number of right-hand sides, i.e., the number of columns of the
102+
matrix `B`.
103+
104+
L: Float64Array
105+
Multipliers that define the matrix `L`.
106+
107+
sl: integer
108+
Stride length for `L`.
109+
110+
ol: integer
111+
Starting index for `L`.
112+
113+
D: Float64Array
114+
Diagonal elements of the upper triangular matrix `U`.
115+
116+
sd: integer
117+
Stride length for `D`.
118+
119+
od: integer
120+
Starting index for `D`.
121+
122+
U: Float64Array
123+
Elements of the first super-diagonal of `U`.
124+
125+
su: integer
126+
Stride length for `U`.
127+
128+
ou: integer
129+
Starting index for `U`.
130+
131+
U2: Float64Array
132+
Elements of the second super-diagonal of `U`.
133+
134+
su2: integer
135+
Stride length for `U2`.
136+
137+
ou2: integer
138+
Starting index for `U2`.
139+
140+
I: Int32Array
141+
Array of pivot indices.
142+
143+
si: integer
144+
Stride length for `I`.
145+
146+
oi: integer
147+
Starting index for `I`.
148+
149+
B: Float64Array
150+
Right-hand side matrix `B`, overwritten by the solution matrix `X`.
151+
152+
s1: integer
153+
Stride length for the first dimension of `B`.
154+
155+
s2: integer
156+
Stride length for the second dimension of `B`.
157+
158+
ob: integer
159+
Starting index for `B`.
160+
161+
Returns
162+
-------
163+
B: Float64Array
164+
Mutated input matrix.
165+
166+
Examples
167+
--------
168+
> var L = new {{alias:@stdlib/array/float64}}( [ 0.25, 0.26666667 ] );
169+
> var D = new {{alias:@stdlib/array/float64}}([ 4.0, 3.75, 3.73333333 ]);
170+
> var U = new {{alias:@stdlib/array/float64}}( [ 1.0, 0.73333333 ] );
171+
> var U2 = new {{alias:@stdlib/array/float64}}( [ 0.0 ] );
172+
> var B = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 7.0 ] );
173+
> var I = new {{alias:@stdlib/array/int32}}( [ 0, 1, 2 ] );
174+
> {{alias}}.ndarray(1,3,1,L,1,0,D,1,0,U,1,0,U2,1,0,I,1,0,B,1,1,0)
175+
<Float64Array>[ ~1.44, ~1.25, ~1.55 ]
176+
177+
See Also
178+
--------

lib/node_modules/@stdlib/lapack/base/dgtts2/lib/base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ function noTranspose( N, nrhs, DL, sdl, odl, D, sd, od, DU, sdu, odu, DU2, sdu2,
266266
* var IPIV = new Int32Array( [ 0, 1, 2 ] );
267267
* var B = new Float64Array( [ 7.0, 8.0, 7.0 ] );
268268
*
269-
* var out = base( 1, 3, 1, DL, 1, 0, D, 1, 0, DU, 1, 0, DU2, 1, 0, IPIV, 1, 0, B, 1, 1, 0 );
269+
* var out = dgtts2( 1, 3, 1, DL, 1, 0, D, 1, 0, DU, 1, 0, DU2, 1, 0, IPIV, 1, 0, B, 1, 1, 0 );
270270
* // out => <Float64Array>[ ~1.44, ~1.25, ~1.55 ]
271271
*/
272-
function base( itrans, N, nrhs, DL, sdl, odl, D, sd, od, DU, sdu, odu, DU2, sdu2, odu2, IPIV, si, oi, B, sb1, sb2, ob ) {
272+
function dgtts2( itrans, N, nrhs, DL, sdl, odl, D, sd, od, DU, sdu, odu, DU2, sdu2, odu2, IPIV, si, oi, B, sb1, sb2, ob ) {
273273
if ( N === 0 || nrhs === 0 ) {
274274
return B;
275275
}
@@ -284,4 +284,4 @@ function base( itrans, N, nrhs, DL, sdl, odl, D, sd, od, DU, sdu, odu, DU2, sdu2
284284

285285
// EXPORTS //
286286

287-
module.exports = base;
287+
module.exports = dgtts2;

lib/node_modules/@stdlib/lapack/base/dgtts2/lib/dgtts2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var base = require( './base.js' );
2828
// MAIN //
2929

3030
/**
31-
* Solves a system of linear equations with a tri diagonal matrix using the LU factorization.
31+
* Solves a system of linear equations with a tri diagonal matrix using the LU factorization computed by `dgttrf`.
3232
*
3333
* @param {string} order - storage layout of B
3434
* @param {integer} itrans - specifies the form of the system of equations

0 commit comments

Comments
 (0)