Exemple #1
0
 def _create_multi_domain_function_using(self,
                                         domain_functions: list) -> None:
     """Creates a new MultiDomainFunction using the provided functions corresponding to a domain each."""
     self.fitting_context.simultaneous_fit_function = MultiDomainFunction()
     for i, function in enumerate(domain_functions):
         self.fitting_context.simultaneous_fit_function.add(function)
         self.fitting_context.simultaneous_fit_function.setDomainIndex(i, i)
    def create_multi_domain_function(self, function_list):
        if not any(function_list):
            return None
        multi_domain_function = MultiDomainFunction()
        for index, func in enumerate(function_list):
            multi_domain_function.add(func)
            multi_domain_function.setDomainIndex(index, index)

        return multi_domain_function