Logo Search packages:      
Sourcecode: jblas version File versions  Download package

FloatMatrix org::jblas::la::FloatMatrix::rowSums (  )  [inline]

Return a vector containing the sum of the rows.

Definition at line 1989 of file FloatMatrix.java.

References columns, dup(), FloatMatrix(), get(), put(), and rows.

Referenced by rowMeans().

                                 {
        if (columns == 1) {
            return dup();
        } else {
            FloatMatrix v = new FloatMatrix(rows);

            for (int c = 0; c < columns; c++) {
                for (int r = 0; r < rows; r++) {
                    v.put(r, v.get(r) + get(r, c));
                }
            }

            return v;
        }
    }


Generated by  Doxygen 1.6.0   Back to index