org.apache.sysml.udf.lib

Class GatherWrapper

  • All Implemented Interfaces:
    Serializable


    public class GatherWrapper
    extends PackageFunction
    Wrapper class for conversions of bit vectors to condensed position vectors. The semantics are equivalent to the following dml snippet: # bitvector into position vector, e.g., 1011 -> 1034 Bv = seq(1,nrow(B)) * B; # gather positions into condensed vector V = removeEmpty(target=Bv, margin="rows"); Note that the inverse operation would be a scatter that can be implemented via the following dml snippet: # position vector into bit vector, e.g., 1034 -> 1011 B = table( V, 1 );
    See Also:
    Serialized Form
    • Constructor Detail

      • GatherWrapper

        public GatherWrapper()
    • Method Detail

      • getNumFunctionOutputs

        public int getNumFunctionOutputs()
        Description copied from class: PackageFunction
        Method to get the number of outputs of this package function. This method should be implemented in the user's function.
        Specified by:
        getNumFunctionOutputs in class PackageFunction
        Returns:
        number of outputs
      • getFunctionOutput

        public FunctionParameter getFunctionOutput(int pos)
        Description copied from class: PackageFunction
        Method to get a specific output of this package function. This method should be implemented in the user's function.
        Specified by:
        getFunctionOutput in class PackageFunction
        Parameters:
        pos - function position
        Returns:
        function parameter
      • execute

        public void execute()
        Description copied from class: PackageFunction
        Method that will be executed to perform this function.
        Specified by:
        execute in class PackageFunction

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