src/utils/procedure/expression/DotExpression.java
public void calculateGradient(int sampleIndex) throws MatrixException {
        if (result.getGradient(sampleIndex) == null) throw new MatrixException(getExpressionName() + ": Result gradient not defined.");
        if (!argument1.isStopGradient()) argument1.cumulateGradient(sampleIndex, dotGradient1MatrixOperation.apply(result.getGradient(sampleIndex), argument2.getMatrix(sampleIndex).transpose(), argument1.getEmptyMatrix()), false);
        if (!argument2.isStopGradient()) argument2.cumulateGradient(sampleIndex, dotGradient2MatrixOperation.apply(argument1.getMatrix(sampleIndex).transpose(), result.getGradient(sampleIndex), argument2.getEmptyMatrix()), false);
    }
/**
     * Calculates gradient of expression.
     *
     * @param sampleIndex sample index
     * @throws MatrixException throws exception if calculation of gradient fails.
     */
Calculates gradient of expression.

@param sampleIndex sample index
@throws MatrixException throws exception if calculation of gradient fails.
Calculates gradient of expression . @param sampleIndex sample index @throws MatrixException throws exception if calculation of gradient fails .
public void calculateGradient(int sampleIndex) throws MatrixException {
        if (result.getGradient(sampleIndex) == null) throw new MatrixException(getExpressionName() + ": Result gradient not defined.");
        if (!argument1.isStopGradient()) argument1.cumulateGradient(sampleIndex, dotGradient1MatrixOperation.apply(result.getGradient(sampleIndex), argument2.getMatrix(sampleIndex).transpose(), argument1.getEmptyMatrix()), false);
        if (!argument2.isStopGradient()) argument2.cumulateGradient(sampleIndex, dotGradient2MatrixOperation.apply(argument1.getMatrix(sampleIndex).transpose(), result.getGradient(sampleIndex), argument2.getEmptyMatrix()), false);
    }
public void calculateGradient ( int sampleIndex ) throws MatrixException { if ( result . getGradient ( sampleIndex ) == null ) throw new MatrixException ( getExpressionName ( ) + ": Result gradient not defined." ) ; if ( ! argument1 . isStopGradient ( ) ) argument1 . cumulateGradient ( sampleIndex , dotGradient1MatrixOperation . apply ( result . getGradient ( sampleIndex ) , argument2 . getMatrix ( sampleIndex ) . transpose ( ) , argument1 . getEmptyMatrix ( ) ) , false ) ; if ( ! argument2 . isStopGradient ( ) ) argument2 . cumulateGradient ( sampleIndex , dotGradient2MatrixOperation . apply ( argument1 . getMatrix ( sampleIndex ) . transpose ( ) , result . getGradient ( sampleIndex ) , argument2 . getEmptyMatrix ( ) ) , false ) ; }
Calculates gradient of expression.
Calculates gradient of expression .