Hi dear team,
I wish to implement a class of a joint likelihood function that consist of two sub-likelihood functions.
The class inherits from Function and AbstractParameterizble, and maintains the sub-likelihood functions as data members.
The function needs to have the parameters of its two sub-functions assigned to it as well, so that any alteration of these parameters would trigger the computation of two functions in practice:
- The sub-function that originally held the parameter (and more correctly, whose model originally held the parameter)
- The joint likelihood function instance (via its implementation of the function fireParameterChanged())
Please note that the computation of the joint likelihood relies on the computation of the sub-function, so the sub-function must be updated before the joint one, upon alteration of a shared parameter.
I saw there was an option to set a ParameterListener for a parameter, that respond to each event of alteration of the parameter. Can I can set for each parameter two listeners: the original sub-function and the joint function?
Many thanks!
Keren