Skip to content

Rust feature/rls - #318

Merged
elnaske merged 39 commits into
rust/devfrom
rust-feature/rls
Sep 26, 2026
Merged

elnaske merged 39 commits into
rust/devfrom
rust-feature/rls

Conversation

@bglid

@bglid bglid commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Description

Adds RLS algorithm port.

Changes

  • Creates and adds RLS algorithm to Rust crate and Python bindings. New file rls.rs + full pipeline to export python bindings.
  • Adds RLS related tests to test_filters.py and test_bindings.py in parameterized tests
  • Adds two new Error values in error.rs that are specific to RLS algorithm
  • Fixes mysterious rollback to float64 in fd_filter_model.py that causes warning.
  • Updates update_step() to be &mut self since RLS has a mutable state in the form of it's p_matrix containing previous history. Updates tests for Lms and Nlms alongside.

Questions requesting check on:

  • Use of single unwrap() in update_step() appropriate and checked?
  • is switching update_step() to mut actually fine here? Any considerations?

Related Issue

Part of #307

@bglid
bglid requested a review from elnaske September 17, 2026 11:35
@bglid bglid added the Rust label Sep 17, 2026
@bglid bglid added this to the v0.2.0 - Initial Release milestone Sep 17, 2026
Comment thread src/algorithms/rls.rs
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
@bglid

bglid commented Sep 22, 2026

Copy link
Copy Markdown
Owner Author

Thanks again for doing that. Going to revert Delta to stop being a newtype for now and also change the name as discussed with a few other minor changes. I can take a look at the TODOs too (like switching KalmanGain's new() for WindowSize). Then I can update docs.

Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
Comment thread src/error.rs Outdated
Comment thread src/error.rs Outdated

@elnaske elnaske left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a great improvement over the previous version. Just the few things I mentioned, then we can merge. I had a couple other nitpicks about the docs, but we can address those when in #311

Comment thread src/algorithms/rls.rs Outdated
Comment thread src/algorithms/rls.rs Outdated
@bglid

bglid commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner Author

This is a great improvement over the previous version. Just the few things I mentioned, then we can merge. I had a couple other nitpicks about the docs, but we can address those when in #311

Ayy thank you. The help and guidance was greatly appreciated. Learned a lot through this one with regard to Rust so I appreciate your patience lol. Should be all set now addressing those last points.

@elnaske elnaske left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, merging

@elnaske
elnaske merged commit babf0b3 into rust/dev Sep 26, 2026
9 checks passed
@elnaske
elnaske deleted the rust-feature/rls branch September 26, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants