-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I've noticed that the root finding algorithms all take a mutable reference to the Convergency
trait, which seems odd. In particular, I was hoping to have a const
Convergency set for a module, but this is impossible to achieve because it must be mutable.
Are there any use case for a mutable convergency test other than in DebugConvergency? I would have thought that if DebugConvergency is the only reason why this is used, would it not be better to make it internally mutable through a RwLock
(or similar)? As that is for debugging, the extra overhead should not be too much of a concern.
In fact, would it be better if the functions to use an associated type instead of &mut dyn Convergency
? This would allow for mutable cases as well as immutable cases. I've created a small gist that shows what I mean.