/// <summary> /// Gets the column at the given index. /// </summary> /// <param name="c">The column index.</param> /// <returns>The column.</returns> public IVectorD Column(int c) { var result = new double[rows]; for (var r = 0; r < rows; r++) { result[r] = GetAt(r, c); } return(VectorFactory.Build(ref result)); }
/// <summary> /// Gets the row at the given index. /// </summary> /// <param name="r">The row index.</param> /// <returns>The row.</returns> public IVectorD Row(int r) { var result = new double[columns]; for (var c = 0; c < columns; c++) { result[c] = GetAt(r, c); } return(VectorFactory.Build(ref result)); }