Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Returning a Dict type instead of a tuple #63

@pwl

Description

@pwl

Wouldn't it be better if we returned a Dict type instead of a tuple? In particular, what would be the downsides of returning

`Dict('t'=>tout,'y'=>yout)`

or

`Dict(:t=>tout,:y=>yout)`

(sorry, I don't know which one is the canonical way) instead of just

`(tout,yout)`

? Is it about performance issues related to creating the Dict with every iteration?

One advantage of this system would be that we would be able to unify the outputs of different solvers, e.g. DASSL returns (tout,yout,dyout). One could also think about adding solver-specific data like the number of rejected steps, jacobian computations, step size etc. without causing API incompatibilities. I know that some of these functions can be implemented via function side effects, but there are some that cannot be accessed that way (e.g. rejected steps) and it would be nice to have them all in one place. Besides, such data could be immensely useful for testing (one could think of improving the results presented in @mauro3's test suite https://github.com/mauro3/IVPTestSuite.jl).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions