AMICI-dev / AMICI

Advanced Multilanguage Interface to CVODES and IDAS
https://amici.readthedocs.io/
Other
108 stars 31 forks source link

Skip unnecessary toposorting in `DEModel._collect_heaviside_roots` #2299

Closed dweindl closed 8 months ago

dweindl commented 8 months ago

Sorting is only required if roots have been found. Most often this will not be the case. Only sort when necessary.

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (3573131) 77.75% compared to head (7e7fb90) 77.75%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/graphs/tree.svg?width=650&height=150&src=pr&token=1bt9lbspzk&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev)](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) ```diff @@ Coverage Diff @@ ## develop #2299 +/- ## ======================================== Coverage 77.75% 77.75% ======================================== Files 318 318 Lines 20511 20513 +2 Branches 1436 1436 ======================================== + Hits 15948 15950 +2 Misses 4560 4560 Partials 3 3 ``` | [Flag](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | `73.53% <100.00%> (+<0.01%)` | :arrow_up: | | [cpp_python](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | `34.00% <100.00%> (+<0.01%)` | :arrow_up: | | [petab](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | `36.38% <100.00%> (-0.02%)` | :arrow_down: | | [python](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | `72.31% <100.00%> (+<0.01%)` | :arrow_up: | | [sbmlsuite](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | `∅ <ø> (∅)` | | 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=AMICI-dev#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev) | Coverage Δ | | |---|---|---| | [python/sdist/amici/de\_export.py](https://app.codecov.io/gh/AMICI-dev/AMICI/pull/2299?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AMICI-dev#diff-cHl0aG9uL3NkaXN0L2FtaWNpL2RlX2V4cG9ydC5weQ==) | `91.77% <100.00%> (+0.01%)` | :arrow_up: |