Skip to content
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
191fc91
feat: add base implementation
aayush0325 May 12, 2025
08cc97d
feat: add main export
aayush0325 May 12, 2025
3a12298
test: add initial tests
aayush0325 May 12, 2025
080ed50
test: add P job test
aayush0325 May 12, 2025
02f5d2d
test: add test for S job
aayush0325 May 12, 2025
0b4af09
test: add test for job = B
aayush0325 May 12, 2025
aeaff94
test: add ndarray tests
aayush0325 May 12, 2025
03a6986
chore: cleanup
aayush0325 May 12, 2025
5f956b0
test: add tests for empty submatrix
aayush0325 May 13, 2025
4ab0380
test: add more tests
aayush0325 May 13, 2025
8192ae8
test: add test for norm = 0
aayush0325 May 13, 2025
f70eec0
test: add test for small values
aayush0325 May 13, 2025
c9ded98
refactor: update job names
aayush0325 May 13, 2025
2c45388
test: add tests with weird values
aayush0325 May 13, 2025
6d755ca
test: add ndarray tests
aayush0325 May 13, 2025
91366cd
test: add some tests
aayush0325 May 14, 2025
ecf4a87
test: more negative stride tests
aayush0325 May 14, 2025
91d0ec8
test: add tests for negative strides
aayush0325 May 14, 2025
7631cba
chore: clean up
aayush0325 May 14, 2025
7030f4d
test: add offset tests
aayush0325 May 15, 2025
f6fcf1d
test: add tests for mixed strides
aayush0325 May 15, 2025
f6054c2
test: add tests for large strides
aayush0325 May 15, 2025
099194a
docs: add examples
aayush0325 May 15, 2025
2ca9245
bench: add benchmarks and cleanup
aayush0325 May 16, 2025
a69fa0b
fix: out should be an int32array because it contains indices
aayush0325 May 16, 2025
2ac5b9c
chore: remove decimals from int32arrays
aayush0325 May 16, 2025
ee1d3a1
chore: cleanupp
aayush0325 May 16, 2025
eb38b48
docs: update docs
aayush0325 May 16, 2025
b516efd
docs: add ts declaration file
aayush0325 May 16, 2025
3f05266
test: add ts test file
aayush0325 May 16, 2025
c86cd76
docs: add repl.txt
aayush0325 May 16, 2025
51b8662
docs: add readme
aayush0325 May 17, 2025
115d185
chore: linting error
aayush0325 May 17, 2025
944cc60
chore: linting error
aayush0325 May 17, 2025
bd0084f
chore: move variables to a separate section
aayush0325 May 18, 2025
09f01ca
chore: update error message
aayush0325 May 21, 2025
50a4de1
chore: update error mesages
aayush0325 May 21, 2025
0c607b9
chore: resolve conflicts
aayush0325 May 22, 2025
021712f
refactor: pointer arithmetics
aayush0325 May 22, 2025
89c3b1c
refactor: pointer arithmetic
aayush0325 May 22, 2025
5f0fdaa
refactor: pointer arithmetic
aayush0325 May 22, 2025
d50308b
refactor: pointer arithmetic
aayush0325 May 22, 2025
ff55902
refactor: pointer arithmetic
aayush0325 May 22, 2025
ab129fe
chore: code review
aayush0325 Aug 19, 2025
c640b9f
chore: code review
aayush0325 Aug 19, 2025
9707ea7
chore: code review
aayush0325 Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: code review
---
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: 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
---
  • Loading branch information
aayush0325 committed Aug 19, 2025
commit c640b9ff8977d4303d894d4a814366fce31f5166
36 changes: 26 additions & 10 deletions lib/node_modules/@stdlib/lapack/base/dgebal/lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

/* eslint-disable max-len, max-params, max-statements */
/* eslint-disable max-len, max-params, max-statements, max-lines-per-function */

'use strict';

Expand Down Expand Up @@ -104,9 +104,14 @@ function dgebal( job, N, A, strideA1, strideA2, offsetA, out, strideOut, offsetO
var ia2;
var ia3;
var ia4;
var oa1;
var oa2;
var oa3;
var oa4;
var ca;
var ra;
var is;
var os;
var c;
var r;
var k;
Expand Down Expand Up @@ -184,15 +189,21 @@ function dgebal( job, N, A, strideA1, strideA2, offsetA, out, strideOut, offsetO
}
}

os = offsetScale + ( k * strideScale );
oa1 = offsetA + ( k * strideA2 );
oa2 = offsetA + ( k * strideA2 );
oa3 = offsetA + ( k * strideA1 );
oa4 = offsetA + ( k * strideA1 );

noconv = true;
while ( noconv ) {
// Search for columns isolating an eigenvalue and push them left
noconv = false;
is = offsetScale + ( k * strideScale ); // Follows scale
ia1 = offsetA + ( k * strideA2 ); // Follows `j`th column of A
ia2 = offsetA + ( k * strideA2 ); // Follows `k`th column of A
ia3 = offsetA + ( k * strideA1 ); // Follows `j`th row of A
ia4 = offsetA + ( k * strideA1 ); // Follows `k`th row of A
is = os; // Follows scale
ia1 = oa1; // Follows `j`th column of A
ia2 = oa2; // Follows `k`th column of A
ia3 = oa3; // Follows `j`th row of A
ia4 = oa4; // Follows `k`th row of A

for ( j = k; j <= l; j++ ) {
canSwap = true;
Expand Down Expand Up @@ -232,13 +243,18 @@ function dgebal( job, N, A, strideA1, strideA2, offsetA, out, strideOut, offsetO
return 0;
}

os = offsetScale + ( k * strideScale );
oa1 = offsetA + ( k * strideA1 ) + ( k * strideA2 );
oa2 = offsetA + ( k * strideA1 ) + ( k * strideA2 );
oa3 = offsetA + ( k * strideA2 );

// Balance the submatrix in rows K to L, iterative loop for norm reduction (job = 'B')
noconv = true;
while ( noconv ) {
is = offsetScale + ( k * strideScale ); // Follows scale
ia1 = offsetA + ( k * strideA1 ) + ( k * strideA2 ); // Follows A[ k, i ]
ia2 = offsetA + ( k * strideA1 ) + ( k * strideA2 ); // Follows A[ i, k ]
ia3 = offsetA + ( k * strideA2 ); // follows `i`th column of A
is = os; // Follows scale
ia1 = oa1; // Follows A[ k, i ]
ia2 = oa2; // Follows A[ i, k ]
ia3 = oa3; // follows `i`th column of A

noconv = false;
for ( i = k; i <= l; i++ ) {
Expand Down
Loading