IFunctionFactory
hep.aida

Interface IFunctionFactory

  • All Known Implementing Classes:
    FunctionFactory


    public interface IFunctionFactory
    Function factory.
    • Method Detail

      • createFunctionByName

        IFunction createFunctionByName(String path,                             String model)                               throws IllegalArgumentException
        Create function from a model registered in the catalog. This is the easiest way to create simple model functions for fitting. Every AIDA compliant implementation should predefine "G", "E", "Pn" (n is an integer, e.e "P0","P5"). Simple operations are permitted, e.g. "G+P2".
        Parameters:
        path - The path of the IFunction. The path can either be a relative or full path. ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths). All the directories in the path must exist. The characther `/` cannot be used in names; it is only used to delimit directories within paths.
        model - The model of the function to be created.
        Returns:
        The newly created function.
        Throws:
        IllegalArgumentException - if a directory in the path does not exist, or the path is illegal.
      • createFunctionFromScript

        IFunction createFunctionFromScript(String name,                                 int dim,                                 String valexpr,                                 String parameters,                                 String description)                                   throws IllegalArgumentException
        Create function from script. Script conventions: createFunctionFromScript("f1", 2, "a*x[0]*x[0] + b*x[1]", "a,b","this is my function", "x[0]*x[0],x[1]")
        Parameters:
        path - The path of the IFunction. The path can either be a relative or full path. ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths). All the directories in the path must exist. The characther `/` cannot be used in names; it is only used to delimit directories within paths.
        dim - The dimension of the function, i.e. the number of variables.
        valexpr - The expression of the scripted function.
        parameters - A comma separeted list of what has to be considered as a parameter in the valexpr expression.
        description - The description of the function.
        Returns:
        The newly created function
        Throws:
        IllegalArgumentException - if a directory in the path does not exist, or the path is illegal, or if any of the provided expressions is illigal.
      • createFunctionFromScript

        IFunction createFunctionFromScript(String name,                                 int dim,                                 String valexpr,                                 String parameters,                                 String description,                                 String gradexpr)                                   throws IllegalArgumentException
        Create function from script. Script conventions: createFunctionFromScript("f1", 2, "a*x[0]*x[0] + b*x[1]", "a,b","this is my function", "x[0]*x[0],x[1]")
        Parameters:
        path - The path of the IFunction. The path can either be a relative or full path. ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths). All the directories in the path must exist. The characther `/` cannot be used in names; it is only used to delimit directories within paths.
        dim - The dimension of the function, i.e. the number of variables.
        valexpr - The expression of the scripted function.
        parameters - A comma separeted list of what has to be considered as a parameter in the valexpr expression.
        description - The description of the function.
        gradexpr - A comma separated list of the expressions for the derivatives of the function with respect to the parameters.
        Returns:
        The newly created function
        Throws:
        IllegalArgumentException - if a directory in the path does not exist, or the path is illegal, or if any of the provided expressions is illigal.
      • cloneFunction

        IFunction cloneFunction(String path,                      IFunction f)                        throws IllegalArgumentException
        Create a clone of an existing function.
        Parameters:
        path - The path of the IFunction. The path can either be a relative or full path. ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths). All the directories in the path must exist. The characther `/` cannot be used in names; it is only used to delimit directories within paths.
        f - The IFunction to be cloned.
        Returns:
        The clone of the provided IFunction.
        Throws:
        IllegalArgumentException - if a directory in the path does not exist, or the path is illegal.

SCaVis 2.0 © jWork.ORG