help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Re: gsl ode solver - const a problem?


From: Sumesh P.T.
Subject: Re: [Help-gsl] Re: gsl ode solver - const a problem?
Date: Fri, 18 Sep 2009 18:03:10 +0530

Thanks Heiko. But according to the manual, the 'const' does not seem to be
necessary. I was wondering whether there is another possiblity without
const_cast.
Thanks.
sumesh
On Fri, Sep 18, 2009 at 2:12 PM, Heiko Bauke <address@hidden> wrote:

> Hi,
>
> On Fri, 18 Sep 2009 12:19:23 +0530
> "Sumesh P.T." <address@hidden> wrote:
>
> > I use gsl ode solver in my program for integration as given in :
> >
> http://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html
> > Look at the definition of func
> >
> > func (double t, const double y[], double f[], void *params)
> >
> > y is a const. I am facing an issue because of this.
>
> I also think, this interface has an unfortunate design. In fact, I would
> prefer
>
> func (double t, const double y[], double f[], const void *params)
>
> There is no (obvious) reason why func should change the parameters. The
> current design forces me regularly to apply a const_cast (in C++) when
> solving ODEs with GSL routines.
>
>
>        Heiko
>
> --
> -- Willst du den Wert des Geldes kennenlernen, geh und versuche
> -- dir welches zu borgen. (Benjamin Franklin, 1706-1790)
> -- Cluster Computing @ http://www.clustercomputing.de
> --       Heiko Bauke @ http://www.mpi-hd.mpg.de/personalhomes/bauke
>
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]