feat: add fft/base/fftpack/rffti#11467
Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
---
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: na
- task: lint_javascript_tests
status: passed
- 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
---
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
---
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: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: passed
- task: lint_javascript_src
status: na
- 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
---
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
| * var factors = workspace.slice( 2*N, ( 2*N ) + 4 ); | ||
| * // returns <Float64Array>[ 8, 2, 2, 4 ] | ||
| */ | ||
| declare function rffti( N: number, workspace: Collection<number>, strideW: number, offsetW: number ): void; |
There was a problem hiding this comment.
| declare function rffti( N: number, workspace: Collection<number>, strideW: number, offsetW: number ): void; | |
| declare function rffti<T extends Collection<number>>( N: number, workspace: T, strideW: number, offsetW: number ): T; |
I suggest going ahead and just returning the workspace array. Will require some minor edits here and elsewhere in this PR.
There was a problem hiding this comment.
Thanks for making the updates @kgryte. Should we also update all the examples to show the usage of this as a returned workspace array? For example:
Changing this:
rffti( N, workspace, 1, 0 );
To this:
var out = rffti( N, workspace, 1, 0 );
There was a problem hiding this comment.
Yes, that works. And then you can also add
var bool = ( out === workspace);
// returns truewhich is something we do elsewhere in similar situations.
There was a problem hiding this comment.
Not fully understanding why this file differs from what we did in https://github.com/gunjjoshi/stdlib/blob/20edeac7d326443708e922a8aa99dc6a93baa3ef/lib/node_modules/%40stdlib/fft/base/fftpack/rffti/lib/rffti1.js. What is the reason for the various discrepancies?
| * @param {NonNegativeInteger} offsetF - starting index for `ifac` | ||
| * @returns {void} | ||
| */ | ||
| function rffti1( n, wa, strideW, offsetW, ifac, strideF, offsetF ) { |
There was a problem hiding this comment.
I would revisit this file. IMO, the changes in https://github.com/gunjjoshi/stdlib/blob/20edeac7d326443708e922a8aa99dc6a93baa3ef/lib/node_modules/%40stdlib/fft/base/fftpack/rffti/lib/rffti1.js are arguably better, so unless there is some justification for the current implementation, I'd say go ahead and align with the current status in the draft FFT PR.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
| t.strictEqual( rffti.length, 4, 'returns expected value' ); | ||
| t.end(); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Should add a test confirming that the workspace array is returned.
kgryte
left a comment
There was a problem hiding this comment.
Other than the implementation file, this PR is looking good.
Resolves None.
Description
This pull request:
fft/base/fftpack/rffti, which is a part of fftpack.fft/base/fftpack#4121.Related Issues
This pull request has the following related issues:
None.
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Used AI to understand how we generate C fixtures using FFTPACK.
@stdlib-js/reviewers