|
| 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 `dlascl`. |
| 27 | +*/ |
| 28 | +interface Routine { |
| 29 | + /** |
| 30 | + * Multiplies a real M by N matrix `A` by a real scalar `CTO/CFROM`. |
| 31 | + * |
| 32 | + * @param order - storage layout |
| 33 | + * @param type - specifies the type of matrix `A` |
| 34 | + * @param KL - lower band width of `A`. Referenced only if type is `symmetric-banded-lower` or `banded`. |
| 35 | + * @param KU - upper band width of `A`. Referenced only if type is `symmetric-banded-upper` or `banded`. |
| 36 | + * @param CFROM - the matrix `A` are multiplied by `CTO / CFROM` |
| 37 | + * @param CTO - the matrix `A` are multiplied by `CTO / CFROM` |
| 38 | + * @param M - number of rows in matrix `A` |
| 39 | + * @param N - number of columns in matrix `A` |
| 40 | + * @param A - input matrix |
| 41 | + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 42 | + * @returns scaled matrix `A` |
| 43 | + * |
| 44 | + * @example |
| 45 | + * var Float64Array = require( '@stdlib/array/float64' ); |
| 46 | + * |
| 47 | + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] |
| 48 | + * |
| 49 | + * dlascl( 'row-major', 'general', 0, 0, 1.0, 2.0, 3, 2, A, 2 ); |
| 50 | + * // A => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] |
| 51 | + */ |
| 52 | + ( order: Layout, type: string, KL: number, KU: number, CFROM: number, CTO: number, M: number, N: number, A: Float64Array, LDA: number ): Float64Array; |
| 53 | + |
| 54 | + /** |
| 55 | + * Multiplies a real M by N matrix `A` by a real scalar `CTO/CFROM` using alternative indexing semantics. |
| 56 | + * |
| 57 | + * @param type - specifies the type of matrix `A` |
| 58 | + * @param KL - lower band width of `A`. Referenced only if type is `symmetric-banded-lower` or `banded`. |
| 59 | + * @param KU - upper band width of `A`. Referenced only if type is `symmetric-banded-upper` or `banded`. |
| 60 | + * @param CFROM - the matrix `A` are multiplied by `CTO / CFROM` |
| 61 | + * @param CTO - the matrix `A` are multiplied by `CTO / CFROM` |
| 62 | + * @param M - number of rows in matrix `A` |
| 63 | + * @param N - number of columns in matrix `A` |
| 64 | + * @param A - input matrix |
| 65 | + * @param strideA1 - stride of the first dimension of `A` |
| 66 | + * @param strideA2 - stride of the second dimension of `A` |
| 67 | + * @param offsetA - starting index for `A` |
| 68 | + * @returns scaled matrix `A` |
| 69 | + * |
| 70 | + * @example |
| 71 | + * var Float64Array = require( '@stdlib/array/float64' ); |
| 72 | + * |
| 73 | + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] |
| 74 | + * |
| 75 | + * dlascl.ndarray( 'general', 0, 0, 1.0, 2.0, 3, 2, A, 2, 1, 0 ); |
| 76 | + * // A => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] |
| 77 | + */ |
| 78 | + ndarray( type: string, KL: number, KU: number, CFROM: number, CTO: number, M: number, N: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number ): Float64Array; |
| 79 | +} |
| 80 | + |
| 81 | +/** |
| 82 | +* Multiplies a real M by N matrix `A` by a real scalar `CTO/CFROM`. |
| 83 | +* |
| 84 | +* @param order - storage layout |
| 85 | +* @param type - specifies the type of matrix `A` |
| 86 | +* @param KL - lower band width of `A`. Referenced only if type is `symmetric-banded-lower` or `banded`. |
| 87 | +* @param KU - upper band width of `A`. Referenced only if type is `symmetric-banded-upper` or `banded`. |
| 88 | +* @param CFROM - the matrix `A` are multiplied by `CTO / CFROM` |
| 89 | +* @param CTO - the matrix `A` are multiplied by `CTO / CFROM` |
| 90 | +* @param M - number of rows in matrix `A` |
| 91 | +* @param N - number of columns in matrix `A` |
| 92 | +* @param A - input matrix |
| 93 | +* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 94 | +* @returns scaled matrix `A` |
| 95 | +* |
| 96 | +* @example |
| 97 | +* var Float64Array = require( '@stdlib/array/float64' ); |
| 98 | +* |
| 99 | +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] |
| 100 | +* |
| 101 | +* dlascl( 'row-major', 'general', 0, 0, 1.0, 2.0, 3, 2, A, 2 ); |
| 102 | +* // A => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] |
| 103 | +* |
| 104 | +* @example |
| 105 | +* var Float64Array = require( '@stdlib/array/float64' ); |
| 106 | +* |
| 107 | +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] |
| 108 | +* |
| 109 | +* dlascl.ndarray( 'general', 0, 0, 1.0, 2.0, 3, 2, A, 2, 1, 0 ); |
| 110 | +* // A => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 ] |
| 111 | +*/ |
| 112 | +declare var dlascl: Routine; |
| 113 | + |
| 114 | + |
| 115 | +// EXPORTS // |
| 116 | + |
| 117 | +export = dlascl; |
0 commit comments