/// <summary> /// Returns a sparse sub-matrix containing the requested columns. /// </summary> /// <param name="matrix"></param> /// <param name="columnIndices">The columns to extract.</param> /// <returns>The requested sub-matrix.</returns> public static SparseMatrix FastGetColumns(this SparseMatrix matrix, int[] columnIndices) { var target = new SparseMatrix(matrix.RowCount, columnIndices.Length); matrix.FastGetColumns(columnIndices, target); return(target); }