Пример #1
0
 /** {@inheritDoc} */
 public DoubleVector getRowVector(int row) {
   int cols = columns();
   DenseVector rowVec = new DenseVector(cols);
   for (int c = 0; c < cols; ++c) rowVec.set(c, get(row, c));
   return rowVec;
 }
Пример #2
0
 /** {@inheritDoc} */
 public DoubleVector getColumnVector(int column) {
   int rows = rows();
   DenseVector col = new DenseVector(rows);
   for (int r = 0; r < rows; ++r) col.set(r, get(r, column));
   return col;
 }