Skip to content

Commit 7c084ef

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent c2edbea commit 7c084ef

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/ddiff/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var ddiff = require( '@stdlib/blas/ext/base/ddiff' );
3434

3535
#### ddiff( N, k, x, strideX, N1, prepend, strideP, N2, append, strideA, out, strideOut, workspace, strideW )
3636

37-
Calculates the k-th discrete forward differences of a double-precision floating-point strided array.
37+
Calculates the k-th discrete forward difference of a double-precision floating-point strided array.
3838

3939
```javascript
4040
var Float64Array = require( '@stdlib/array/float64' );
@@ -111,7 +111,7 @@ console.log( out );
111111

112112
#### ddiff.ndarray( N, k, x, strideX, offsetX, N1, prepend, strideP, offsetP, N2, append, strideA, offsetA, out, strideOut, offsetOut, workspace, strideW, offsetW )
113113

114-
Calculates the k-th discrete forward differences of a double-precision floating-point strided array using alternative indexing semantics.
114+
Calculates the k-th discrete forward difference of a double-precision floating-point strided array using alternative indexing semantics.
115115

116116
```javascript
117117
var Float64Array = require( '@stdlib/array/float64' );
@@ -161,6 +161,7 @@ console.log( out );
161161

162162
## Notes
163163

164+
- When `k <= 1`, the workspace array is unused and thus ignored.
164165
- If `N <= 0`, both functions return the output array unchanged.
165166

166167
</section>
@@ -234,7 +235,7 @@ console.log( 'Output: ', out );
234235

235236
#### stdlib_strided_ddiff( N, k, \*X, strideX, N1, \*prepend, strideP, N2, \*append, strideA, \*out, strideOut, \*workspace, strideW )
236237

237-
Calculates the k-th discrete forward differences of a double-precision floating-point strided array.
238+
Calculates the k-th discrete forward difference of a double-precision floating-point strided array.
238239

239240
```c
240241
const double x[] = { 2.0, 4.0, 6.0, 8.0, 10.0 };
@@ -271,7 +272,7 @@ void stdlib_strided_ddiff( const CBLAS_INT N, const CBLAS_INT k, const double *X
271272

272273
#### stdlib_strided_ddiff_ndarray( N, k, \*X, strideX, offsetX, N1, \*prepend, strideP, offsetP, N2, \*append, strideA, offsetA, \*out, strideOut, offsetOut, \*workspace, strideW, offsetW )
273274

274-
Calculates the k-th discrete forward differences of a double-precision floating-point strided array using alternative indexing semantics.
275+
Calculates the k-th discrete forward difference of a double-precision floating-point strided array using alternative indexing semantics.
275276

276277
```c
277278
const double x[] = { 2.0, 4.0, 6.0, 8.0, 10.0 };

lib/node_modules/@stdlib/blas/ext/base/ddiff/docs/types/test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ import ddiff = require( './index' );
4040
const out = new Float64Array( 11 );
4141
const w = new Float64Array( 11 );
4242

43-
ddiff( '10', 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
44-
ddiff( true, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
45-
ddiff( false, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
46-
ddiff( null, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
47-
ddiff( undefined, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
48-
ddiff( [], 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
49-
ddiff( {}, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
50-
ddiff( ( x: number ): number => x, 1.0, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
43+
ddiff( '10', 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
44+
ddiff( true, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
45+
ddiff( false, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
46+
ddiff( null, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
47+
ddiff( undefined, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
48+
ddiff( [], 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
49+
ddiff( {}, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
50+
ddiff( ( x: number ): number => x, 1, x, 1, 1, p, 1, 1, a, 1, out, 1, w, 1 ); // $ExpectError
5151
}
5252

5353
// The compiler throws an error if the function is provided a second argument which is not a number...

lib/node_modules/@stdlib/blas/ext/base/ddiff/include/stdlib/blas/ext/base/ddiff.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ extern "C" {
2929
#endif
3030

3131
/**
32-
* Calculates the k-th discrete forward differences of a double-precision floating-point strided array.
32+
* Calculates the k-th discrete forward difference of a double-precision floating-point strided array.
3333
*/
34-
void API_SUFFIX(stdlib_strided_ddiff)( const CBLAS_INT N, const CBLAS_INT k, const double *X, const CBLAS_INT strideX, const CBLAS_INT N1, const double *prepend, const CBLAS_INT strideP, const CBLAS_INT N2, const double *append, const CBLAS_INT strideA, double *out, const CBLAS_INT strideOut, double *workspace, const CBLAS_INT strideW );
34+
void API_SUFFIX(stdlib_strided_ddiff)( const CBLAS_INT N, const CBLAS_INT k, const double *X, const CBLAS_INT strideX, const CBLAS_INT N1, const double *Prepend, const CBLAS_INT strideP, const CBLAS_INT N2, const double *Append, const CBLAS_INT strideA, double *Out, const CBLAS_INT strideOut, double *Workspace, const CBLAS_INT strideW );
3535

3636
/**
37-
* Calculates the k-th discrete forward differences of a double-precision floating-point strided array using alternative indexing semantics.
37+
* Calculates the k-th discrete forward difference of a double-precision floating-point strided array using alternative indexing semantics.
3838
*/
39-
void API_SUFFIX(stdlib_strided_ddiff_ndarray)( const CBLAS_INT N, const CBLAS_INT k, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const CBLAS_INT N1, const double *prepend, const CBLAS_INT strideP, const CBLAS_INT offsetP, const CBLAS_INT N2, const double *append, const CBLAS_INT strideA, const CBLAS_INT offsetA, double *out, const CBLAS_INT strideOut, const CBLAS_INT offsetOut, double *workspace, const CBLAS_INT strideW, const CBLAS_INT offsetW );
39+
void API_SUFFIX(stdlib_strided_ddiff_ndarray)( const CBLAS_INT N, const CBLAS_INT k, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const CBLAS_INT N1, const double *Prepend, const CBLAS_INT strideP, const CBLAS_INT offsetP, const CBLAS_INT N2, const double *Append, const CBLAS_INT strideA, const CBLAS_INT offsetA, double *Out, const CBLAS_INT strideOut, const CBLAS_INT offsetOut, double *Workspace, const CBLAS_INT strideW, const CBLAS_INT offsetW );
4040

4141

4242
#ifdef __cplusplus

lib/node_modules/@stdlib/blas/ext/base/ddiff/src/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
/**
2525
* Calculates the forward difference of a double-precision floating-point strided array using alternative indexing semantics.
2626
*
27-
* @private
2827
* @param N number of indexed elements
2928
* @param X input array
3029
* @param strideX stride length for X

0 commit comments

Comments
 (0)