src/utils/matrix/operation/UnaryMatrixOperation.java
public void applyFunction(Matrix first, Matrix result) throws MatrixException {
        this.first = first;
        this.result = result;
        switch (unaryFunctionType) {
            case SOFTMAX -> first.softmax(result);
            case GUMBEL_SOFTMAX -> first.gumbelSoftmax(result, unaryFunction.getGumbelSoftmaxTau());
            default -> first.apply(result, matrixUnaryOperation);
        }
    }
/**
     * Applies function to matrix (value)
     *
     * @param first first matrix
     * @param result result matrix
     * @throws MatrixException throws exception if matrix operation fails.
     */
Applies function to matrix (value)

@param first first matrix
@param result result matrix
@throws MatrixException throws exception if matrix operation fails.
Applies function to matrix ( value ) @param first first matrix @param result result matrix @throws MatrixException throws exception if matrix operation fails .
public void applyFunction(Matrix first, Matrix result) throws MatrixException {
        this.first = first;
        this.result = result;
        switch (unaryFunctionType) {
            case SOFTMAX -> first.softmax(result);
            case GUMBEL_SOFTMAX -> first.gumbelSoftmax(result, unaryFunction.getGumbelSoftmaxTau());
            default -> first.apply(result, matrixUnaryOperation);
        }
    }
public void applyFunction ( Matrix first , Matrix result ) throws MatrixException { this . first = first ; this . result = result ; switch ( unaryFunctionType ) { case SOFTMAX -> first . softmax ( result ) ; case GUMBEL_SOFTMAX -> first . gumbelSoftmax ( result , unaryFunction . getGumbelSoftmaxTau ( ) ) ; default -> first . apply ( result , matrixUnaryOperation ) ; } }
Applies function to matrix (value)
Applies function to matrix ( value )