carrascomj / carrascomj/rust_sbml
Use ModelRaw for python API
- Dominant language
- Rust
- Stars
- 9
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
There is not a very good reason to use [Model](https://github.com/carrascomj/rust_sbml/blob/trunk/src/model.rs#L130) instead of [ModelRaw](https://github.com/carrascomj/rust_sbml/blob/trunk/src/model.rs#L30) for the python bindings (at [pyo.rs](https://github.com/carrascomj/rust_sbml/blob/trunk/src/pyo.rs)).
* Drawback: [`getParameter`](https://github.com/carrascomj/rust_sbml/blob/trunk/src/pyo.rs#L114) would be _O(n)_ (or better, whatever [find](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find) is) instead of _O(1)_, but that can be solved easily, if needed (not really, the usual number of parameters in SBML documents do not justify the use of a more complex data structure in this case).
* Advantage: using `ModelRaw` would allow for adding writing capabilities to the python API.
* Advantage: less `String` allocations.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.