src/utils/procedure/expression/VarianceExpression.java
public void calculateExpression(int sampleIndex) throws MatrixException {
        if (executeAsSingleStep()) return;
        if (argument1.getMatrix(sampleIndex) == null) throw new MatrixException(getExpressionName() + "Arguments for operation not defined");
        Matrix mean = argument1.getMatrix(sampleIndex).meanAsMatrix();
        if (means == null) means = new HashMap<>();
        means.put(sampleIndex, mean);
        result.setMatrix(sampleIndex, argument1.getMatrix(sampleIndex).varianceAsMatrix(mean));
    }
/**
     * Calculates expression.
     *
     * @param sampleIndex sample index
     * @throws MatrixException throws exception if calculation fails.
     */
Calculates expression.
@param sampleIndex sample index
@throws MatrixException throws exception if calculation fails.
Calculates expression . @param sampleIndex sample index @throws MatrixException throws exception if calculation fails .
public void calculateExpression(int sampleIndex) throws MatrixException {
        if (executeAsSingleStep()) return;
        if (argument1.getMatrix(sampleIndex) == null) throw new MatrixException(getExpressionName() + "Arguments for operation not defined");
        Matrix mean = argument1.getMatrix(sampleIndex).meanAsMatrix();
        if (means == null) means = new HashMap<>();
        means.put(sampleIndex, mean);
        result.setMatrix(sampleIndex, argument1.getMatrix(sampleIndex).varianceAsMatrix(mean));
    }
public void calculateExpression ( int sampleIndex ) throws MatrixException { if ( executeAsSingleStep ( ) ) return ; if ( argument1 . getMatrix ( sampleIndex ) == null ) throw new MatrixException ( getExpressionName ( ) + "Arguments for operation not defined" ) ; Matrix mean = argument1 . getMatrix ( sampleIndex ) . meanAsMatrix ( ) ; if ( means == null ) means = new HashMap < > ( ) ; means . put ( sampleIndex , mean ) ; result . setMatrix ( sampleIndex , argument1 . getMatrix ( sampleIndex ) . varianceAsMatrix ( mean ) ) ; }
Calculates expression.
Calculates expression .