Re: [Yanl-develop] integrate routines
Brought to you by:
karstenahnert
|
From: Karsten A. <kar...@gm...> - 2009-11-03 10:42:31
|
Hi all, I have thought a little bit about this topic_ 1 .it would be nice to have functions integrate, like integrate( stepper , system , dt , start_time , start_state , steps ) which in-place integrate the start state 2. Functions, like integrate_and_fill( stepper , system , dt , start_time , start_state , container ) integrate_and_fill( stepper , system , dt , start_time , start_state , start_iter , end_iter ) which fill one container with a "time series", (the container version only calls the iterator version), 3 . A version with integrate_and_insert( stepper , system , dt , start_time , start_state , steps , inserter ) which insert the time series into a (mayby empty) container. The inserter is the most general syntax for doing so, but we can also write some other wrappers for this function. I think every funtion is only a two (or three) liner, so there is no much overhead and we have a function for nearly all applications. And of course, we have to introduce some kind of observer concept. Best regards, Karsten Mario Mulansky wrote: > Hi all, > >> void integrate( stepper , system , dt , start_time , start_state , >> end_time , inserter ); >> void integrate( stepper , system , dt , start_time , start_state , >> num_of_steps , inserter ); >> void integrate( stepper , system , dt , start_time , start_state , >> start_iter , end_inter ); >> void integrate( stepper , system , dt , start_time , start_state , >> state_container ); > > I don't exactly understand why we need inserter, start/end_iter and > state_container. All our routines are in-place and work on start_state. If > the user doesn't want his start state overwritten he should copy it himslef > before. I also think one method with number_of_steps is sufficient. For > constant dt the relation to t is obvious and can be left to the user. > > Regards, Mario > >> Maybe one gets into troubles with the first two versions, since end_time >> can easily by casted in num_of_steps. For the inserter one needs the >> InsertIterator requirement[1] and the stepper needs the next_step >> function without error estimation. >> >> Best regards, >> >> Karsten >> >> >> [1] http://www.sgi.com/tech/stl/insert_iterator.html >> >> --------------------------------------------------------------------------- >> --- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is >> the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Yanl-develop mailing list >> Yan...@li... >> https://lists.sourceforge.net/lists/listinfo/yanl-develop > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Yanl-develop mailing list > Yan...@li... > https://lists.sourceforge.net/lists/listinfo/yanl-develop > |