Skip to content

Commit 3db30b3

Browse files
committed
docs: fix examples and spacing
--- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - 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 c139361 commit 3db30b3

File tree

8 files changed

+43
-28
lines changed

8 files changed

+43
-28
lines changed

lib/node_modules/@stdlib/fft/base/fftpack/rffti/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var Float64Array = require( '@stdlib/array/float64' );
4949
var workspace;
5050
var N = 8;
5151

52-
workspace = new Float64Array( (2*N) + 34 );
52+
workspace = new Float64Array( ( 2*N ) + 34 );
5353
rffti( N, workspace, 1, 0 );
5454
```
5555

@@ -70,8 +70,8 @@ The function accepts the following arguments:
7070

7171
## Notes
7272

73-
- The workspace array should have a length of at least `(2*N) + 34` elements.
74-
- For single-point sequences ( N=1 ), the function returns immediately as the FFT is the identity operation.
73+
- The workspace array should have a length of at least `( 2*N ) + 34` elements.
74+
- For single-point sequences ( N = 1 ), the function returns immediately as the FFT is the identity operation.
7575

7676
</section>
7777

@@ -91,7 +91,7 @@ var workspace;
9191
var N = 8;
9292
var i;
9393

94-
workspace = new Float64Array( (2*N) + 34 );
94+
workspace = new Float64Array( ( 2*N ) + 34 );
9595

9696
rffti( N, workspace, 1, 0 );
9797

lib/node_modules/@stdlib/fft/base/fftpack/rffti/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function createBenchmark( N ) {
4848
var workspace;
4949
var i;
5050

51-
workspace = new Float64Array( (2*N) + 34 );
51+
workspace = new Float64Array( ( 2*N ) + 34 );
5252

5353
b.tic();
5454
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/repl.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
Examples
2525
--------
2626
> var N = 8;
27-
> var workspace = new {{alias:@stdlib/array/float64}}( (2*N) + 34 );
28-
> {{alias}}( N, workspace, 1, 0 )
29-
> workspace.slice()
30-
<Float64Array>[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7071067811865476,
31-
... 0.7071067811865475, 0, 0, 0, 0, 8, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
32-
... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
27+
> var workspace = new {{alias:@stdlib/array/float64}}( ( 2*N ) + 34 );
28+
> {{alias}}( N, workspace, 1, 0 );
29+
> workspace.slice( N, 2*N )
30+
<Float64Array>[ 0, 0, ~0.707, ~0.707, 0, 0, 0, 0 ]
31+
> workspace.slice( 2*N, ( 2*N ) + 4 )
32+
<Float64Array>[ 8, 2, 2, 4 ]
3333

3434
See Also
3535
--------

lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/index.d.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* ## Notes
2727
*
28-
* - The workspace array should have a length of at least `(2*N) + 34` elements.
28+
* - The workspace array should have a length of at least `( 2*N ) + 34` elements.
2929
* - For single-point sequences (N=1), the function returns immediately as the FFT is the identity operation.
3030
*
3131
* @param N - length of the sequence to transform
@@ -38,12 +38,17 @@
3838
* var N = 8;
3939
*
4040
* // Initialize a workspace array:
41-
* var workspace = new Float64Array( (2*N) + 34 );
41+
* var workspace = new Float64Array( ( 2*N ) + 34 );
4242
*
4343
* rffti( N, workspace, 1, 0 );
4444
*
45-
* var f = workspace.slice();
46-
* // returns <Float64Array>[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7071067811865476, 0.7071067811865475, 0, 0, 0, 0, 8, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
45+
* // Twiddle factors:
46+
* var f = workspace.slice( N, 2*N );
47+
* // returns <Float64Array>[ 0, 0, ~0.707, ~0.707, 0, 0, 0, 0 ]
48+
*
49+
* // Factorization results:
50+
* f = workspace.slice( 2*N, ( 2*N ) + 4 );
51+
* // returns <Float64Array>[ 8, 2, 2, 4 ]
4752
*/
4853
declare function rffti( N: number, workspace: Float64Array, strideW: number, offsetW: number ): void;
4954

lib/node_modules/@stdlib/fft/base/fftpack/rffti/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var workspace;
2525
var N = 8;
2626
var i;
2727

28-
workspace = new Float64Array( (2*N) + 34 );
28+
workspace = new Float64Array( ( 2*N ) + 34 );
2929

3030
rffti( N, workspace, 1, 0 );
3131

lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@
3030
* var N = 8;
3131
*
3232
* // Initialize a workspace array:
33-
* var workspace = new Float64Array( (2*N) + 34 );
33+
* var workspace = new Float64Array( ( 2*N ) + 34 );
3434
*
3535
* rffti( N, workspace, 1, 0 );
3636
*
37-
* var f = workspace.slice();
38-
* // returns <Float64Array>[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7071067811865476, 0.7071067811865475, 0, 0, 0, 0, 8, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
37+
* // Twiddle factors:
38+
* var f = workspace.slice( N, 2*N );
39+
* // returns <Float64Array>[ 0, 0, ~0.707, ~0.707, 0, 0, 0, 0 ]
40+
*
41+
* // Factorization results:
42+
* f = workspace.slice( 2*N, ( 2*N ) + 4 );
43+
* // returns <Float64Array>[ 8, 2, 2, 4 ]
3944
*/
4045

4146
// MODULES //

lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,17 @@ var rffti1 = require( './rffti1.js' );
142142
* var N = 8;
143143
*
144144
* // Initialize a workspace array:
145-
* var workspace = new Float64Array( (2*N) + 34 );
145+
* var workspace = new Float64Array( ( 2*N ) + 34 );
146146
*
147147
* rffti( N, workspace, 1, 0 );
148148
*
149-
* var f = workspace.slice();
150-
* // returns <Float64Array>[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7071067811865476, 0.7071067811865475, 0, 0, 0, 0, 8, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
149+
* // Twiddle factors:
150+
* var f = workspace.slice( N, 2*N );
151+
* // returns <Float64Array>[ 0, 0, ~0.707, ~0.707, 0, 0, 0, 0 ]
152+
*
153+
* // Factorization results:
154+
* f = workspace.slice( 2*N, ( 2*N ) + 4 );
155+
* // returns <Float64Array>[ 8, 2, 2, 4 ]
151156
*/
152157
function rffti( N, workspace, strideW, offsetW ) {
153158
var offsetT;
@@ -158,7 +163,7 @@ function rffti( N, workspace, strideW, offsetW ) {
158163
!isFloat64Array( workspace ) ||
159164
!isInteger( strideW ) ||
160165
!isNonNegativeInteger( offsetW ) ||
161-
workspace.length < offsetW + ( ( (2*N) + 34 ) * strideW )
166+
workspace.length < offsetW + ( ( ( 2*N ) + 34 ) * strideW )
162167
) {
163168
return;
164169
}

lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tape( 'the function initializes a workspace array for performing a real-valued F
4040
var i;
4141

4242
N = 8;
43-
workspace = new Float64Array( (2*N) + 34 );
43+
workspace = new Float64Array( ( 2*N ) + 34 );
4444
rffti( N, workspace, 1, 0 );
4545

4646
// Checking that the workspace has been initialized with non-zero values:
@@ -62,7 +62,7 @@ tape( 'the function handles N=1 case (identity transform)', function test( t ) {
6262
var i;
6363

6464
N = 1;
65-
workspace = new Float64Array( (2*N) + 34 );
65+
workspace = new Float64Array( ( 2*N ) + 34 );
6666

6767
// Filling with non-zero values to check if they remain unchanged:
6868
for ( i = 0; i < workspace.length; i++ ) {
@@ -86,7 +86,7 @@ tape( 'the function correctly initializes workspace for various sequence lengths
8686

8787
for ( i = 0; i < lengths.length; i++ ) {
8888
N = lengths[ i ];
89-
workspace = new Float64Array( (2*N) + 34 );
89+
workspace = new Float64Array( ( 2*N ) + 34 );
9090
rffti( N, workspace, 1, 0 );
9191
t.strictEqual( workspace[ 2*N ], N, 'stores sequence length N = ' + N + ' in workspace' );
9292
}
@@ -102,7 +102,7 @@ tape( 'the function handles stride parameter correctly', function test( t ) {
102102

103103
N = 8;
104104
stride = 2;
105-
workspace = new Float64Array( ( (2*N) + 34 ) * stride );
105+
workspace = new Float64Array( ( ( 2*N ) + 34 ) * stride );
106106
rffti( N, workspace, stride, 0 );
107107

108108
// Checking that values are stored with the correct stride:
@@ -128,7 +128,7 @@ tape( 'the function handles offset parameter correctly', function test( t ) {
128128

129129
N = 8;
130130
offset = 5;
131-
workspace = new Float64Array( (2*N) + 34 + offset );
131+
workspace = new Float64Array( ( 2*N ) + 34 + offset );
132132
rffti( N, workspace, 1, offset );
133133

134134
// Checking that values are stored with the correct offset:

0 commit comments

Comments
 (0)