dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
384 stars 126 forks source link

Change ParticleState Length check in KLD measure for efficiency #970

Closed timothy-glover closed 3 months ago

timothy-glover commented 3 months ago

The original implementation of input checking for the Kullback Leibler divergence measure used len() on the state.particles object, slowing down execution for the measure and usage in sensor management. The check has been changed in this pull request to use len() on the state object itself. This change has also reduced the time taken to complete sensor management tests, perhaps removing the requirement of the --slow marker.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.49%. Comparing base (27fff99) to head (2f98a56).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #970 +/- ## ========================================== + Coverage 93.46% 93.49% +0.03% ========================================== Files 201 201 Lines 12837 12837 Branches 2629 2629 ========================================== + Hits 11998 12002 +4 + Misses 592 590 -2 + Partials 247 245 -2 ``` | [Flag](https://app.codecov.io/gh/dstl/Stone-Soup/pull/970/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/dstl/Stone-Soup/pull/970/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | `66.24% <0.00%> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/dstl/Stone-Soup/pull/970/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | `89.12% <100.00%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.