Пример #1
0
        /// <summary>
        /// Returns a sparse sub-matrix containing the requested rows.
        /// </summary>
        /// <param name="matrix"></param>
        /// <param name="rowIndices">The rows to extract.</param>
        /// <returns>The requested sub-matrix.</returns>
        public static SparseMatrix FastGetRows(this SparseMatrix matrix, int[] rowIndices)
        {
            var target = new SparseMatrix(rowIndices.Length, matrix.ColumnCount);

            matrix.FastGetRows(rowIndices, target);

            return(target);
        }