| 
 | 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 } from '@stdlib/types/blas';  | 
 | 24 | + | 
 | 25 | +/**  | 
 | 26 | +* Interface describing `dlaqr1`.  | 
 | 27 | +*/  | 
 | 28 | +interface Routine {  | 
 | 29 | +	/**  | 
 | 30 | +	* Given a 2-by-2 or a 3-by-3 matrix, sets `V` to a scalar multiple of the first column of `K` where `K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)`.  | 
 | 31 | +	*  | 
 | 32 | +	* ## Notes  | 
 | 33 | +	*  | 
 | 34 | +	* -   It is expected that either `sr1 = sr2` and `si1 + si2 = 0` or `si1 = si2 = 0` (i.e., they represent complex conjugate values).  | 
 | 35 | +	* -   This is useful for starting double implicit shift bulges in the QR algorithm.  | 
 | 36 | +	* -   `V` should have at least `N` indexed elements.  | 
 | 37 | +	*  | 
 | 38 | +	* @param order - storage layout  | 
 | 39 | +	* @param N - number of row/columns in `H`  | 
 | 40 | +	* @param H - input matrix  | 
 | 41 | +	* @param LDH - stride of the first dimension of `H` (a.k.a., leading dimension of the matrix `H`)  | 
 | 42 | +	* @param sr1 - real part of the first conjugate complex shift  | 
 | 43 | +	* @param si1 - imaginary part of the first conjugate complex shift  | 
 | 44 | +	* @param sr2 - real part of the second conjugate complex shift  | 
 | 45 | +	* @param si2 - imaginary part of the second conjugate complex shift  | 
 | 46 | +	* @param V - output array  | 
 | 47 | +	* @returns `V`  | 
 | 48 | +	*  | 
 | 49 | +	* @example  | 
 | 50 | +	* var Float64Array = require( '@stdlib/array/float64' );  | 
 | 51 | +	*  | 
 | 52 | +	* var H = new Float64Array( [ 1.0, 3.0, 2.0, 2.0, 4.0, 6.0, 0.0, 5.0, 7.0 ] );  | 
 | 53 | +	* var V = new Float64Array( 3 );  | 
 | 54 | +	*  | 
 | 55 | +	* dlaqr1( 'row-major', 3, H, 3, 1.5, 0.0, 2.5, 0.0, V );  | 
 | 56 | +	* // V => <Float64Array>[ ~1.93, ~0.57, ~2.86 ]  | 
 | 57 | +	*/  | 
 | 58 | +	( order: Layout, N: number, H: Float64Array, LDH: number, sr1: number, si1: number, sr2: number, si2: number, V: Float64Array ): Float64Array;  | 
 | 59 | + | 
 | 60 | +	/**  | 
 | 61 | +	* Given a 2-by-2 or a 3-by-3 matrix, sets `V` to a scalar multiple of the first column of `K` where `K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)` using alternative indexing semantics.  | 
 | 62 | +	*  | 
 | 63 | +	* ## Notes  | 
 | 64 | +	*  | 
 | 65 | +	* -   It is expected that either `sr1 = sr2` and `si1 + si2 = 0` or `si1 = si2 = 0` (i.e., they represent complex conjugate values).  | 
 | 66 | +	* -   This is useful for starting double implicit shift bulges in the QR algorithm.  | 
 | 67 | +	* -   `V` should have at least `N` indexed elements.  | 
 | 68 | +	*  | 
 | 69 | +	* @param N - number of row/columns in `H`  | 
 | 70 | +	* @param H - input matrix  | 
 | 71 | +	* @param strideH1 - stride of the first dimension of `H`  | 
 | 72 | +	* @param strideH2 - stride of the second dimension of `H`  | 
 | 73 | +	* @param offsetH - index offset for `H`  | 
 | 74 | +	* @param sr1 - real part of the first conjugate complex shift  | 
 | 75 | +	* @param si1 - imaginary part of the first conjugate complex shift  | 
 | 76 | +	* @param sr2 - real part of the second conjugate complex shift  | 
 | 77 | +	* @param si2 - imaginary part of the second conjugate complex shift  | 
 | 78 | +	* @param V - output array  | 
 | 79 | +	* @param strideV - stride length for `V`  | 
 | 80 | +	* @param offsetV - index offset for `V`  | 
 | 81 | +	* @returns `V`  | 
 | 82 | +	*  | 
 | 83 | +	* @example  | 
 | 84 | +	* var Float64Array = require( '@stdlib/array/float64' );  | 
 | 85 | +	*  | 
 | 86 | +	* var H = new Float64Array( [ 1.0, 3.0, 2.0, 2.0, 4.0, 6.0, 0.0, 5.0, 7.0 ] );  | 
 | 87 | +	* var V = new Float64Array( 3 );  | 
 | 88 | +	*  | 
 | 89 | +	* dlaqr1.ndarray( 3, H, 3, 1, 0, 1.5, 0.0, 2.5, 0.0, V, 1, 0 );  | 
 | 90 | +	* // V => <Float64Array>[ ~1.93, ~0.57, ~2.86 ]  | 
 | 91 | +	*/  | 
 | 92 | +	ndarray( N: number, H: Float64Array, strideH1: number, strideH2: number, offsetH: number, sr1: number, si1: number, sr2: number, si2: number, V: Float64Array, strideV: number, offsetV: number ): Float64Array;  | 
 | 93 | +}  | 
 | 94 | + | 
 | 95 | +/**  | 
 | 96 | +* Given a 2-by-2 or a 3-by-3 matrix, sets `V` to a scalar multiple of the first column of `K` where `K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)`.  | 
 | 97 | +*  | 
 | 98 | +* ## Notes  | 
 | 99 | +*  | 
 | 100 | +* -   It is expected that either `sr1 = sr2` and `si1 + si2 = 0` or `si1 = si2 = 0` (i.e., they represent complex conjugate values).  | 
 | 101 | +* -   This is useful for starting double implicit shift bulges in the QR algorithm.  | 
 | 102 | +* -   `V` should have at least `N` indexed elements.  | 
 | 103 | +*  | 
 | 104 | +* @param order - storage layout  | 
 | 105 | +* @param N - number of row/columns in `H`  | 
 | 106 | +* @param H - input matrix  | 
 | 107 | +* @param LDH - stride of the first dimension of `H` (a.k.a., leading dimension of the matrix `H`)  | 
 | 108 | +* @param sr1 - real part of the first conjugate complex shift  | 
 | 109 | +* @param si1 - imaginary part of the first conjugate complex shift  | 
 | 110 | +* @param sr2 - real part of the second conjugate complex shift  | 
 | 111 | +* @param si2 - imaginary part of the second conjugate complex shift  | 
 | 112 | +* @param V - output array  | 
 | 113 | +* @returns `V`  | 
 | 114 | +*  | 
 | 115 | +* @example  | 
 | 116 | +* var Float64Array = require( '@stdlib/array/float64' );  | 
 | 117 | +*  | 
 | 118 | +* var H = new Float64Array( [ 1.0, 3.0, 2.0, 2.0, 4.0, 6.0, 0.0, 5.0, 7.0 ] );  | 
 | 119 | +* var V = new Float64Array( 3 );  | 
 | 120 | +*  | 
 | 121 | +* dlaqr1( 'row-major', 3, H, 3, 1.5, 0.0, 2.5, 0.0, V );  | 
 | 122 | +* // V => <Float64Array>[ ~1.93, ~0.57, ~2.86 ]  | 
 | 123 | +*  | 
 | 124 | +* @example  | 
 | 125 | +* var Float64Array = require( '@stdlib/array/float64' );  | 
 | 126 | +*  | 
 | 127 | +* var H = new Float64Array( [ 1.0, 3.0, 2.0, 2.0, 4.0, 6.0, 0.0, 5.0, 7.0 ] );  | 
 | 128 | +* var V = new Float64Array( 3 );  | 
 | 129 | +*  | 
 | 130 | +* dlaqr1.ndarray( 3, H, 3, 1, 0, 1.5, 0.0, 2.5, 0.0, V, 1, 0 );  | 
 | 131 | +* // V => <Float64Array>[ ~1.93, ~0.57, ~2.86 ]  | 
 | 132 | +*/  | 
 | 133 | +declare var dlaqr1: Routine;  | 
 | 134 | + | 
 | 135 | + | 
 | 136 | +// EXPORTS //  | 
 | 137 | + | 
 | 138 | +export = dlaqr1;  | 
0 commit comments