From a613640d8ba7ed4d80b38036cb59225003297b4f Mon Sep 17 00:00:00 2001 From: Jens Krumsieck Date: Mon, 5 Sep 2022 22:46:28 +0200 Subject: [PATCH] Delete unused extensions --- ChemSharp/Extensions/ArrayExtensions.cs | 32 ------------------------- 1 file changed, 32 deletions(-) delete mode 100644 ChemSharp/Extensions/ArrayExtensions.cs diff --git a/ChemSharp/Extensions/ArrayExtensions.cs b/ChemSharp/Extensions/ArrayExtensions.cs deleted file mode 100644 index e92e965..0000000 --- a/ChemSharp/Extensions/ArrayExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace ChemSharp.Extensions; - -public static class ArrayExtensions -{ - /// - /// Gets Column of Multidimensional Array - /// - /// - /// - /// - /// - public static T[] GetColumn(this T[,] matrix, int columnNumber) => - Enumerable.Range(0, matrix.GetLength(0)) - .Select(x => matrix[x, columnNumber]) - .ToArray(); - - /// - /// Gets Row of Multidimensional Array - /// - /// - /// - /// - /// - public static T[] GetRow(this T[,] matrix, int rowNumber) => - Enumerable.Range(0, matrix.GetLength(1)) - .Select(x => matrix[rowNumber, x]) - .ToArray(); - - public static int[] FindAllIndicesOf(this T[] array, Predicate match) => - array.Select((value, index) => match(value) ? index : -1) - .Where(index => index != -1).ToArray(); -}