You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both classes have a lot in common (everything related to the Brian simulation), and should inherit from a common superclass to share the code. Another possible approach would be to put all the shared code in a separate class that neither Fitter nor Inferencer inherits from, and delegate to an object of that class (e.g. everything related to the simulation could be in a BrianSimulator class, and both Fitter and Inferencer would do something like self.brian_simulator = BrianSimulator(...) in their __init__ and then call self.brian_simulator... for all simulation-related tasks.) Actually, there is already a Simulator class (with implementations for runtime and standalone) – maybe some more code could simply move into this class.
The text was updated successfully, but these errors were encountered:
Both classes have a lot in common (everything related to the Brian simulation), and should inherit from a common superclass to share the code. Another possible approach would be to put all the shared code in a separate class that neither
Fitter
norInferencer
inherits from, and delegate to an object of that class (e.g. everything related to the simulation could be in aBrianSimulator
class, and bothFitter
andInferencer
would do something likeself.brian_simulator = BrianSimulator(...)
in their__init__
and then callself.brian_simulator...
for all simulation-related tasks.) Actually, there is already aSimulator
class (with implementations for runtime and standalone) – maybe some more code could simply move into this class.The text was updated successfully, but these errors were encountered: