Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate make_random_state() method #324

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

hidmic
Copy link
Collaborator

@hidmic hidmic commented Feb 17, 2024

Proposed changes

Connected to #279. Follow-up to #322. This is a long due change, and as I was reworking sensor models I figured it was appropriate. This patch removes make_random_state() from sensor models. As we still support mixins, it relocates make_random_state() to the RandomStateGenerator mixin, which now takes both state and map as template parameters.

Type of change

  • 馃悰 Bugfix (change which fixes an issue)
  • 馃殌 Feature (change which adds functionality)
  • 馃摎 Documentation (change which fixes or extends documentation)

馃挜 Breaking change! Sensor models no longer have nor require a make_random_state() method.

Checklist

  • Lint and unit tests (if any) pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All commits have been signed for DCO

Additional comments

I'm not super fond of these changes to RandomStateGenerator, but they are not unreasonable in context and it is arguably a temporary workaround.

We also have to update https://github.com/Ekumen-OS/beluga-demos to match.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Copy link
Member

@nahueespinosa nahueespinosa left a comment

Choose a reason for hiding this comment

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

馃檶 LGTM!

@hidmic
Copy link
Collaborator Author

hidmic commented Feb 18, 2024

Hmm, I suspect coverage worsened because this patch removes more code than it adds (and thus it changed proportions). How do you want to go about it @nahueespinosa?

@nahueespinosa
Copy link
Member

@hidmic Let's go ahead and merge. I don't see anything standing out in the coverage reports.

@hidmic hidmic merged commit ab06665 into main Feb 18, 2024
7 of 8 checks passed
@hidmic hidmic deleted the hidmic/relocate-make-random-state branch February 18, 2024 16:46
nahueespinosa pushed a commit that referenced this pull request Feb 18, 2024
### Proposed changes

Follow-up to #322 and #324. This patch turns `LandmarkMapBoundaries`
into an `Eigen::AlignedBox3d` alias.

#### Type of change

- [ ] 馃悰 Bugfix (change which fixes an issue)
- [x] 馃殌 Feature (change which adds functionality)
- [ ] 馃摎 Documentation (change which fixes or extends documentation)

馃挜 **Breaking change!** This will allow us to use `LandmarkMap` limits as
constraint for `MultivariateUniformDistribution` instances.

### Checklist

- [x] Lint and unit tests (if any) pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if appropriate)
- [x] All commits have been signed for
[DCO](https://developercertificate.org/)

### Additional comments

We have to update https://github.com/Ekumen-OS/beluga-demos too.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
nahueespinosa pushed a commit that referenced this pull request Feb 19, 2024
### Proposed changes

Depends on #324. This patch migrates sensor models to a functional form.
This affords:

```c++
beluga::actions::reweight(std::execution::par, sensor(std::move(measurement)))
```

when reweighting particles.

#### Type of change

- [ ] 馃悰 Bugfix (change which fixes an issue)
- [x] 馃殌 Feature (change which adds functionality)
- [ ] 馃摎 Documentation (change which fixes or extends documentation)

### Checklist

- [x] Lint and unit tests (if any) pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if appropriate)
- [x] All commits have been signed for
[DCO](https://developercertificate.org/)

---------

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
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.

None yet

2 participants