Skip to content

Add discrete convolution of two vectors#2299

Merged
thofma merged 4 commits into
Nemocas:masterfrom
Tobias271828:dev_con
Jun 2, 2026
Merged

Add discrete convolution of two vectors#2299
thofma merged 4 commits into
Nemocas:masterfrom
Tobias271828:dev_con

Conversation

@Tobias271828
Copy link
Copy Markdown
Contributor

This adds discrete convolutions.

A discrete convolution of two vectors [a1, a2, a3, ...] and [b1, b2, b3, ...] is the vector [a1*b1, a2*b1 + a1*b2, a3*b1 + a2*b2 + a1*b3, ...].

This function behaves similar to convolve in NumPy (Python).

This moves oscar-system/Oscar.jl#5997 to Nemo instead of Oscar. For more information concerning

  • Different approaches to implementing this (naive approach, polynomial multiplication, pure pointwise multiplication of Fourier transformed vectors)
  • Benchmarking comparisons of those
  • Possible use cases of this

see oscar-system/Oscar.jl#5997

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.32%. Comparing base (0edb516) to head (36a90c4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2299      +/-   ##
==========================================
- Coverage   88.35%   88.32%   -0.04%     
==========================================
  Files         102      102              
  Lines       37463    37468       +5     
==========================================
- Hits        33101    33093       -8     
- Misses       4362     4375      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@thofma thofma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A small test would be nice. (Also the file needs to end with a newline.)

Comment thread src/poly.jl Outdated
@thofma thofma added enhancement release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels May 20, 2026
@thofma thofma merged commit 73e7fa8 into Nemocas:master Jun 2, 2026
20 of 23 checks passed
@Tobias271828 Tobias271828 deleted the dev_con branch June 2, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants