DiffEqNoiseProcess.jl icon indicating copy to clipboard operation
DiffEqNoiseProcess.jl copied to clipboard

Add remake ability for NoiseProcess

Open dannys4 opened this issue 3 years ago • 7 comments

This should allow the user to remake a NoiseProcess.

dannys4 avatar Aug 16 '22 19:08 dannys4

Willing to take criticism on this method of doing it-- you could probably get close by taking advantage of the generic definition of remake in DiffEqBase, but AFAIK you'd have to remove the defined constructor for NoiseProcess and expose the original constructor, which could break a lot of downstream stuff for a tiny tweak. I felt more comfortable adding a few specific, but extensible utilities prescribed for the NoiseProcess type. If you disagree or find this dubious, feel free to close without merging.

dannys4 avatar Aug 16 '22 21:08 dannys4

Also, I'd be happy to add a test if you're content with the implementation and would like me to.

dannys4 avatar Aug 16 '22 22:08 dannys4

I think I would test that copy works as intended (same data, different memory)

mschauer avatar Aug 17 '22 06:08 mschauer

This is fine, just needs tests.

ChrisRackauckas avatar Aug 17 '22 07:08 ChrisRackauckas

Xoshiro is only defined v1.7 and above I think, so the test needs a v1.6 version

ChrisRackauckas avatar Aug 19 '22 21:08 ChrisRackauckas

What is the status of this?

Notice that copy for every type of noise has been recently implemented in #127 and can be useful.

Question? Is remake assume to keep the same field types and just change the values or does it (in general) allow changing the type as well?

rmsrosa avatar Nov 04 '22 14:11 rmsrosa

Question? Is remake assume to keep the same field types and just change the values or does it (in general) allow changing the type as well?

Nevermind. I just checked that remake for an ODEProblem allows changing the type of fields. But the implemented copy, and any sound implementation of similar keeps the type. So, if we want to allow changing the type, we would need to implement remake directly.

rmsrosa avatar Nov 04 '22 23:11 rmsrosa