diff --git a/MatrixExtensions.cs b/MatrixExtensions.cs index 0cac5cd..d5fc6ef 100644 --- a/MatrixExtensions.cs +++ b/MatrixExtensions.cs @@ -231,8 +231,8 @@ namespace MatrixExtensions TNumber tmp = Computation.NumericCalculation(arg1, context); List vector = new List(Utilites.EntryMatrix2ArrStr(tmp.obj)); - vector.RemoveAt(vector.Count - 1); - vector.RemoveAt(vector.Count - 1); + //vector.RemoveAt(vector.Count - 1); + //vector.RemoveAt(vector.Count - 1); List distinct = vector.Distinct().ToList(); List answer = new List(); diff --git a/Utilites.cs b/Utilites.cs index 5cd3c11..56f0ba0 100644 --- a/Utilites.cs +++ b/Utilites.cs @@ -16,9 +16,18 @@ namespace MatrixExtensions internal static string[] EntryMatrix2ArrStr(BaseEntry matrix) { - string source = matrix.ToString(); - source = source.Trim(new char[] { 'm', 'a', 't', '(', ')' }); - return source.Split(','); + TMatrix mt = matrix as TMatrix; + //int n = mt.unit.GetLength(0); + //int m = mt.unit.GetLength(0); + List mts = new List(mt.Length()); + foreach (var item in mt.unit) + { + mts.Add(item.obj.ToString()); + } + //string source = matrix.ToString(); + //source = source.Trim(new char[] { 'm', 'a', 't', '(', ')' }); + //return source.Split(',','\n'); + return mts.ToArray(); } internal static double[] EntryVec2Arr(Entry vector)