Skip to content

Commit 591f7c7

Browse files
Shabareesh ShettyShabareesh Shetty
authored andcommitted
chore: use banded matrix
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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 0a9161c commit 591f7c7

File tree

1 file changed

+6
-4
lines changed
  • lib/node_modules/@stdlib/blas/base/dgbmv/examples

1 file changed

+6
-4
lines changed

lib/node_modules/@stdlib/blas/base/dgbmv/examples/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
'use strict';
2020

21-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
21+
var filled2dBy = require( '@stdlib/array/base/banded/filled2d-by' );
22+
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
23+
var uniform = require( '@stdlib/random/array/discrete-uniform' );
2224
var dgbmv = require( './../lib' );
2325

2426
var opts = {
@@ -29,11 +31,11 @@ var M = 3;
2931
var N = 3;
3032

3133
// Define N-by-N banded matrix:
32-
var A = [ 0, 9, 10, 11, 12, 5, 1, 2, 0 ];
34+
var A = filled2dBy( [ N, N ], 1, 1, 0.0, discreteUniform.factory( -10, 10 ) );
3335

3436
// Create random vectors:
35-
var x = discreteUniform( N, 0, 255, opts );
36-
var y = discreteUniform( M, 0, 255, opts );
37+
var x = uniform( N, 0, 255, opts );
38+
var y = uniform( M, 0, 255, opts );
3739

3840
// Performs one of the matrix-vector operations `y := α*A*x + β*y`:
3941
dgbmv( 'row-major', 'no-transpose', M, N, 1, 1, 1.0, A, N, x, 1, 1.0, y, 1 );

0 commit comments

Comments
 (0)