carrascomj / carrascomj/rust_sbml

Use ModelRaw for python API

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.