mirror of
https://github.com/rumata-ap/MatrixExtension_SMathStudio.git
synced 2026-01-10 03:09:46 +03:00
refactoring
This commit is contained in:
@@ -231,8 +231,8 @@ namespace MatrixExtensions
|
||||
TNumber tmp = Computation.NumericCalculation(arg1, context);
|
||||
|
||||
List<string> vector = new List<string>(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<string> distinct = vector.Distinct().ToList();
|
||||
|
||||
List<Term> answer = new List<Term>();
|
||||
|
||||
15
Utilites.cs
15
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<string> mts = new List<string>(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)
|
||||
|
||||
Reference in New Issue
Block a user