1462 Add ScalarType to Code examples in the documentation#1546
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates C++ documentation (and one example) to use ScalarType consistently in code examples after the floating-point template parameter changes introduced in #1018, addressing issue #1462.
Changes:
- Replace hard-coded
doubletemplate arguments/usages in many model documentation snippets withScalarType. - Align selected model-/parameter-template usages in documentation with the current templated APIs.
- Update
cpp/examples/ode_secirvvs.cppto useScalarTypeandModel<ScalarType>.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/source/cpp/models/osir.rst | Update simulation/time-series examples to use ScalarType. |
| docs/source/cpp/models/oseirv.rst | Switch model instantiation and time-related variables to ScalarType. |
| docs/source/cpp/models/oseirdb.rst | Update contact pattern and simulation snippets to ScalarType. |
| docs/source/cpp/models/oseir.rst | Update contact pattern and simulation snippets to ScalarType. |
| docs/source/cpp/models/osecirvvs.rst | Update vaccination/contact/NPI/simulation examples to ScalarType. |
| docs/source/cpp/models/osecirts.rst | Update contact/NPI/simulation examples to ScalarType. |
| docs/source/cpp/models/osecir.rst | Update contact pattern and simulation snippets to ScalarType. |
| docs/source/cpp/models/omseirs4.rst | Update simulation time variables to ScalarType. |
| docs/source/cpp/models/lsecir2d.rst | Update LCT-SECIR-2D type definitions and examples to use ScalarType. |
| docs/source/cpp/models/lsecir.rst | Update LCT-SECIR type definitions and examples to use ScalarType. |
| docs/source/cpp/models/iseir.rst | Update IDE-SEIR initialization snippets to use ScalarType. |
| docs/source/cpp/models/isecir.rst | Update IDE-SECIR flows/contact/output snippets to use ScalarType. |
| docs/source/cpp/models/glsecir.rst | Update GLCT-SECIR type/parameter examples to use ScalarType. |
| cpp/examples/ode_secirvvs.cpp | Switch example simulation parameters and model template arg to ScalarType. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Kilian Volmer <13285635+kilianvolmer@users.noreply.github.com>
kilianvolmer
left a comment
There was a problem hiding this comment.
Great, we can merge this as soon as the CI ran through.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1546 +/- ##
==========================================
- Coverage 97.45% 97.42% -0.04%
==========================================
Files 190 190
Lines 15963 15966 +3
==========================================
- Hits 15557 15555 -2
- Misses 406 411 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)
Closes #1462