org.apache.sysml.udf

Class PackageFunction

    • Constructor Detail

      • PackageFunction

        public PackageFunction()
    • Method Detail

      • getNumFunctionInputs

        public final int getNumFunctionInputs()
        Method to get the number of inputs to this package function.
        Returns:
        number of inputs
      • getFunctionInput

        public final FunctionParameter getFunctionInput(int pos)
        Method to get a specific input to this package function.
        Parameters:
        pos - input position
        Returns:
        function parameter
      • getNumFunctionOutputs

        public abstract int getNumFunctionOutputs()
        Method to get the number of outputs of this package function. This method should be implemented in the user's function.
        Returns:
        number of outputs
      • getFunctionOutput

        public abstract FunctionParameter getFunctionOutput(int pos)
        Method to get a specific output of this package function. This method should be implemented in the user's function.
        Parameters:
        pos - function position
        Returns:
        function parameter
      • setNumFunctionInputs

        public final void setNumFunctionInputs(int numInputs)
        Method to set the number of inputs for this package function
        Parameters:
        numInputs - number of inputs
      • setInput

        public final void setInput(FunctionParameter input,
                                   int pos)
        Method to set a specific input for this package function
        Parameters:
        input - function parameter input
        pos - input position
      • setConfiguration

        public final void setConfiguration(String fName)
        Method to set the configuration file for this function.
        Parameters:
        fName - configuration file name
      • getConfiguration

        public final String getConfiguration()
        Method to get the configuration file name
        Returns:
        configuration file name
      • setBaseDir

        public void setBaseDir(String dir)
      • getBaseDir

        public String getBaseDir()
      • createOutputFilePathAndName

        public String createOutputFilePathAndName(String fname)
      • execute

        public abstract void execute()
        Method that will be executed to perform this function.

Copyright © 2017 The Apache Software Foundation. All rights reserved.