org.apache.sysml.udf.lib

Class PermutationMatrixWrapper

  • All Implemented Interfaces:
    Serializable

    Deprecated.

    @Deprecated
    public class PermutationMatrixWrapper
    extends PackageFunction
    Wrapper class for Sorting and Creating of a Permutation Matrix Sort single-column matrix and produce a permutation matrix. Pre-multiplying the input matrix with the permutation matrix produces a sorted matrix. A permutation matrix is a matrix where each row and each column as exactly one 1: To From 1 Input: (n x 1)-matrix, and true/false for sorting in descending order Output: (n x n)- matrix permutation_matrix= externalFunction(Matrix[Double] A, Boolean desc) return (Matrix[Double] P) implemented in (classname="org.apache.sysml.udf.lib.PermutationMatrixWrapper" ,exectype="mem"); A = read( "Data/A.mtx"); P = permutation_matrix( A[,2], false); B = P %*% A
    See Also:
    Serialized Form
    • Constructor Detail

      • PermutationMatrixWrapper

        public PermutationMatrixWrapper()
        Deprecated. 
    • Method Detail

      • getNumFunctionOutputs

        public int getNumFunctionOutputs()
        Deprecated. 
        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)
        Deprecated. 
        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()
        Deprecated. 
        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.