src/utils/procedure/expression/AbstractExpression.java
public void calculateGradientStep(Set<Integer> sampleIndices, int numberOfGradientSteps) throws MatrixException, DynamicParamException {
        int gradientStepCount = 0;
        if (executeAsSingleStep()) {
            for (Integer sampleIndex : sampleIndices) {
                updateGradientDependency(sampleIndex);
                if (numberOfGradientSteps > 0 && ++gradientStepCount >= numberOfGradientSteps) break;
            }
            calculateGradient();
        }
        else {
            for (Integer sampleIndex : sampleIndices) {
                updateGradientDependency(sampleIndex);
                calculateGradient(sampleIndex);
                if (numberOfGradientSteps > 0 && ++gradientStepCount >= numberOfGradientSteps) break;
            }
        }
        if (previousExpression != null) previousExpression.calculateGradientStep(sampleIndices, numberOfGradientSteps);
    }
/**
     * Calculates entire gradient expression chain including regulation.
     *
     * @param sampleIndices sample indices
     * @param numberOfGradientSteps number of gradient steps taken
     * @throws MatrixException throws exception if calculation fails.
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     */
Calculates entire gradient expression chain including regulation.

@param sampleIndices sample indices
@param numberOfGradientSteps number of gradient steps taken
@throws MatrixException throws exception if calculation fails.
@throws DynamicParamException throws exception if parameter (params) setting fails.
Calculates entire gradient expression chain including regulation . @param sampleIndices sample indices @param numberOfGradientSteps number of gradient steps taken @throws MatrixException throws exception if calculation fails . @throws DynamicParamException throws exception if parameter ( params ) setting fails .
public void calculateGradientStep(Set<Integer> sampleIndices, int numberOfGradientSteps) throws MatrixException, DynamicParamException {
        int gradientStepCount = 0;
        if (executeAsSingleStep()) {
            for (Integer sampleIndex : sampleIndices) {
                updateGradientDependency(sampleIndex);
                if (numberOfGradientSteps > 0 && ++gradientStepCount >= numberOfGradientSteps) break;
            }
            calculateGradient();
        }
        else {
            for (Integer sampleIndex : sampleIndices) {
                updateGradientDependency(sampleIndex);
                calculateGradient(sampleIndex);
                if (numberOfGradientSteps > 0 && ++gradientStepCount >= numberOfGradientSteps) break;
            }
        }
        if (previousExpression != null) previousExpression.calculateGradientStep(sampleIndices, numberOfGradientSteps);
    }
public void calculateGradientStep ( Set < Integer > sampleIndices , int numberOfGradientSteps ) throws MatrixException , DynamicParamException { int gradientStepCount = 0 ; if ( executeAsSingleStep ( ) ) { for ( Integer sampleIndex : sampleIndices ) { updateGradientDependency ( sampleIndex ) ; if ( numberOfGradientSteps > 0 && ++ gradientStepCount >= numberOfGradientSteps ) break ; } calculateGradient ( ) ; } else { for ( Integer sampleIndex : sampleIndices ) { updateGradientDependency ( sampleIndex ) ; calculateGradient ( sampleIndex ) ; if ( numberOfGradientSteps > 0 && ++ gradientStepCount >= numberOfGradientSteps ) break ; } } if ( previousExpression != null ) previousExpression . calculateGradientStep ( sampleIndices , numberOfGradientSteps ) ; }
Calculates entire gradient expression chain including regulation.
Calculates entire gradient expression chain including regulation .