Skip to content

Move mat and trunc_series into num/, add num/linear_fn - #89

Merged
ecnerwala merged 2 commits into
masterfrom
devin/1787205742-num-mat-trunc-linear-fn
Aug 20, 2026
Merged

Move mat and trunc_series into num/, add num/linear_fn#89
ecnerwala merged 2 commits into
masterfrom
devin/1787205742-num-mat-trunc-linear-fn

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

mat<num, N> and trunc_series<num, N> move verbatim out of fft/engines/algebras.hpp into num/mat.hpp and num/trunc_series.hpp (now in namespace wala instead of wala::fft::engines); the componentwise wrapper engines are unchanged and pick them up by include.

New num/linear_fn.hpp:

// x -> a * x + b; operator* is composition: (f * g)(x) = f(g(x)).
// Default-constructs to the identity.
template <typename num> struct linear_fn { num a = 1; num b = 0; ... };

with operator(), *, *=, ==, plus a small Catch2 test.

The three verify/ds/ affine segtree solutions drop their local linear_fn structs and use wala::linear_fn<num> (f * lazy for composition, default construction for identity, and point_set_range_composite folds the query directly via x = seg[a](x)). All three re-verified AC locally; unit tests pass.

Link to Devin session: https://app.devin.ai/sessions/a0c142d72b3848a8926b2fc111685565
Requested by: @ecnerwala


Open in Devin Review (Beta)

devin-ai-integration Bot and others added 2 commits August 20, 2026 06:02
Co-Authored-By: Andrew He <7088371+ecnerwala@users.noreply.github.com>
Co-Authored-By: Andrew He <7088371+ecnerwala@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@beta-devin-ai-integration beta-devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review (Beta)

@ecnerwala
ecnerwala merged commit 5bd9c56 into master Aug 20, 2026
12 checks passed
@ecnerwala
ecnerwala deleted the devin/1787205742-num-mat-trunc-linear-fn branch August 20, 2026 06:07
@github-actions

Copy link
Copy Markdown

GCC Code Coverage Report

📂 Overall coverage

Metric Coverage
Lines 🟡 8634/10190 (84.7%)
Functions 🟢 1159/1264 (91.7%)
Branches 🟡 6615/8518 (77.7%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant