Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more generic interface for solver #11

Open
pboesu opened this issue Aug 29, 2016 · 1 comment
Open

more generic interface for solver #11

pboesu opened this issue Aug 29, 2016 · 1 comment
Milestone

Comments

@pboesu
Copy link
Owner

pboesu commented Aug 29, 2016

The solver system is not open to extension in its current state:

  if(solver == 1 || solver == "ode"){
    #require(deSolve)
    out <- try(ode(inits, times, sim, parms=params, verbose=verbose , method=method, ...))
  }

Is there a reason why solver can't be made more generic? All it would really take is passing solver in as a function (along with a description of the form it should take). The existing ode/dde/dede if/else statements could be largely replaced by a little bit of wrapper code, such as:

if (is.character(solver)) {
  if (solver == "ode") {
    solver <- deSolve::ode(inits, times, sim, params, 
                           verbose=verbose, method=method, ...)
  } # ...and so on for the others.
}

In any case, because the method parameters passed along is the same as the default to ode, it can be dropped and passed along with ....

@pboesu pboesu modified the milestone: resubmission Aug 29, 2016
@pboesu pboesu modified the milestones: resubmission, 0.5 Sep 14, 2016
@pboesu
Copy link
Owner Author

pboesu commented Sep 14, 2016

postponed until https://github.com/pboesu/debinfer/milestone/2

@pboesu pboesu closed this as completed Sep 14, 2016
@pboesu pboesu reopened this Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant