def create_embedded_meth(self):
        """
        Build the estimator methods or functions.

        Returns
        -------
        :return : string
            The built methods as merged string.
        """
        # Generate related trees:
        fns = []
        for idx, estimator in enumerate(self.estimators):
            tree = self.create_single_method(idx, estimator)
            fns.append(tree)
        fns = '\n'.join(fns)

        # Generate method or function names:
        fn_names = ''
        if self.target_language in ['c', 'java']:
            fn_names = []
            temp_method_calls = self.temp('embedded.method_calls', n_indents=2,
                                          skipping=True)
            for idx, estimator in enumerate(self.estimators):
                cl_name = self.class_name
                fn_name = self.method_name + '_' + str(idx)
                fn_name = temp_method_calls.format(class_name=cl_name,
                                                   method_name=fn_name,
                                                   method_index=idx)
                fn_names.append(fn_name)
            fn_names = '\n'.join(fn_names)
            fn_names = self.indent(fn_names, n_indents=1, skipping=True)

        # Merge generated content:
        n_indents = 1 if self.target_language in ['java', 'js'] else 0
        temp_method = self.temp('embedded.method')
        method = temp_method.format(method_name=self.method_name,
                                    class_name=self.class_name,
                                    method_calls=fn_names, methods=fns,
                                    n_estimators=self.n_estimators,
                                    n_classes=self.n_classes)
        return self.indent(method, n_indents=n_indents, skipping=True)
def create_embedded_meth ( self ) : fns = [ ] for idx , estimator in enumerate ( self . estimators ) : tree = self . create_single_method ( idx , estimator ) fns . append ( tree ) fns = '\n' . join ( fns ) fn_names = '' if self . target_language in [ 'c' , 'java' ] : fn_names = [ ] temp_method_calls = self . temp ( 'embedded.method_calls' , n_indents = 2 , skipping = True ) for idx , estimator in enumerate ( self . estimators ) : cl_name = self . class_name fn_name = self . method_name + '_' + str ( idx ) fn_name = temp_method_calls . format ( class_name = cl_name , method_name = fn_name , method_index = idx ) fn_names . append ( fn_name ) fn_names = '\n' . join ( fn_names ) fn_names = self . indent ( fn_names , n_indents = 1 , skipping = True ) n_indents = 1 if self . target_language in [ 'java' , 'js' ] else 0 temp_method = self . temp ( 'embedded.method' ) method = temp_method . format ( method_name = self . method_name , class_name = self . class_name , method_calls = fn_names , methods = fns , n_estimators = self . n_estimators , n_classes = self . n_classes ) return self . indent ( method , n_indents = n_indents , skipping = True )
Build the estimator methods or functions.

        Returns
        -------
        :return : string
            The built methods as merged string.