public void updateRow(int i, double c, Vec b)
    {
        if(b.length() != this.cols())
            throw new ArithmeticException("vector is not of the same column length");
        if (b.isSparse())
            for (IndexValue iv : b)
                this.increment(i, iv.getIndex(), c * iv.getValue());
        else
            for (int j = 0; j < b.length(); j++)
                this.increment(i, j, c * b.get(j));
    }
public void updateRow ( int i , double c , Vec b ) { if ( b . length ( ) != this . cols ( ) ) throw new ArithmeticException ( "vector is not of the same column length" ) ; if ( b . isSparse ( ) ) for ( IndexValue iv : b ) this . increment ( i , iv . getIndex ( ) , c * iv . getValue ( ) ) ; else for ( int j = 0 ; j < b . length ( ) ; j ++ ) this . increment ( i , j , c * b . get ( j ) ) ; }
Alters row i of <i>this</i> matrix, such that
<i>A[i,:] = A[i,:] + c*<b>b</b></i>
@param i the index of the row to update
@param c the scalar constant to multiply the vector by
@param b the vector to add to the specified row