Skip to content

Commit c19837b

Browse files
committed
chore: final docs changes
--- 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_pkg_readmes status: passed - task: lint_markdown_docs status: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent dc49006 commit c19837b

3 files changed

Lines changed: 16 additions & 37 deletions

File tree

lib/node_modules/@stdlib/blas/base/dzasum/README.md

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@ limitations under the License.
2222

2323
> Compute the sum of the absolute values of the real and imaginary components of a double-precision complex floating-point vector.
2424
25-
<section class="intro">
26-
27-
dzasum is defined as
28-
29-
<!-- <equation class="equation" label="eq:l1norm" align="center" raw="\|\mathbf{x}\|_1 = \sum_{i=0}^{n-1} \left( |a_i| + |b_i| \right)" alt="L1 norm definition."> -->
30-
31-
```math
32-
\|\mathbf{x}\|_1 = \sum_{i=0}^{n-1} \left( |a_i| + |b_i| \right)
33-
```
34-
35-
<!-- <div class="equation" align="center" data-raw-text="\|\mathbf{x}\|_1 = \sum_{i=0}^{n-1} \left( |a_i| + |b_i| \right)" data-equation="eq:l1norm">
36-
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@c403cb0cbb15d9b7b453e3cea34ca2379500ddd4/lib/node_modules/@stdlib/blas/base/dasum/docs/img/equation_l1norm.svg" alt="L1 norm definition.">
37-
<br>
38-
</div> -->
39-
40-
<!-- </equation> -->
41-
42-
</section>
43-
44-
<!-- /.intro -->
45-
4625
<section class="usage">
4726

4827
## Usage
@@ -58,10 +37,10 @@ Computes the sum of the absolute values of the real and imaginary components of
5837
```javascript
5938
var Complex128Array = require( '@stdlib/array/complex128' );
6039

61-
var x = new Complex128Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
40+
var x = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2 ] );
6241

63-
var out = dzasum( x.length, x, 1 );
64-
// returns 19.0
42+
var out = dzasum( 4, x, 1 );
43+
// returns ~1.6
6544
```
6645

6746
The function has the following parameters:
@@ -87,14 +66,14 @@ Note that indexing is relative to the first index. To introduce an offset, use [
8766
var Complex128Array = require( '@stdlib/array/complex128' );
8867

8968
// Initial array:
90-
var x0 = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0 ] );
69+
var x0 = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
9170

9271
// Create an offset view:
9372
var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
9473

9574
// Compute the sum of absolute values:
96-
var out = dzasum( 2, x1, 2 );
97-
// returns 22.0
75+
var out = dzasum( 2, x1, 1 );
76+
// returns 18.0
9877
```
9978

10079
#### dzasum.ndarray( N, x, strideX, offsetX )
@@ -104,10 +83,10 @@ Computes the sum of the absolute values of the real and imaginary components of
10483
```javascript
10584
var Complex128Array = require( '@stdlib/array/complex128' );
10685

107-
var x = new Complex128Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
86+
var x = new Complex128Array( [ 0.3, 0.1, 0.5, 0.0, 0.0, 0.5, 0.0, 0.2 ] );
10887

109-
var out = dzasum.ndarray( x.length, x, 1, 0 );
110-
// returns 19.0
88+
var out = dzasum.ndarray( 4, x, 1, 0 );
89+
// returns ~1.6
11190
```
11291

11392
The function has the following additional parameters:
@@ -119,10 +98,10 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
11998
```javascript
12099
var Complex128Array = require( '@stdlib/array/complex128' );
121100

122-
var x = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0 ] );
101+
var x = new Complex128Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
123102

124-
var out = dzasum.ndarray( 3, x, 1, 1 );
125-
// returns 33.0
103+
var out = dzasum.ndarray( 2, x, 1, 1 );
104+
// returns 18.0
126105
```
127106

128107
</section>

lib/node_modules/@stdlib/blas/base/dzasum/lib/dzasum.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ var ndarray = require( './ndarray.js' );
3737
* @example
3838
* var Complex128Array = require( '@stdlib/array/complex128' );
3939
*
40-
* var x = new Complex128Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
40+
* var x = new Complex128Array( [ 5.0, -3.0, 6.0, 4.0 ] );
4141
*
4242
* var out = dzasum( x.length, x, 1 );
43-
* // returns 19.0
43+
* // returns 18.0
4444
*/
4545
function dzasum( N, x, strideX ) {
4646
var ox = stride2offset( N, strideX );

lib/node_modules/@stdlib/blas/base/dzasum/lib/ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
3838
* @example
3939
* var Complex128Array = require( '@stdlib/array/complex128' );
4040
*
41-
* var x = new Complex128Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
41+
* var x = new Complex128Array( [ 5.0, -3.0, 6.0, 4.0 ] );
4242
*
4343
* var out = dzasum( x.length, x, 1, 0 );
44-
* // returns 19.0
44+
* // returns 18.0
4545
*/
4646
function dzasum( N, x, strideX, offsetX ) {
4747
var viewX;

0 commit comments

Comments
 (0)