protected double[] PrecessClasterByDimentions(List <double[]> claster, Func <STAT, double> geterResultValueFunc, Action <STAT> provessAction = null) { int n = claster[0].Length; int N = claster.Count; var arr = ArrayMatrix.TransposeArr(claster.ToArray()); //for (int i = 0; i < N; i++) // for (int j = 0; j < n; i++) // arr[j][i] = claster[i][j]; double[] result = new double[n]; for (int i = 0; i < n; i++) { STAT s = new STAT(); s.Setd2Stat2d(arr[i]); provessAction?.Invoke(s); result[i] = geterResultValueFunc(s); } return(result); }
private double[] PrecessClasterByDimentions(List <double[]> claster, Func <STAT, double> geterResultValueFunc, Action <STAT> provessAction) { int n = claster[0].Length; int N = claster.Count; var arr = ArrayMatrix.GetJaggedArray(n, N); for (int i = 0; i < N; i++) { for (int j = 0; j < n; i++) { arr[j][i] = claster[i][j]; } } double[] result = new double[n]; for (int i = 0; i < n; i++) { STAT s = new STAT(); s.Setd2Stat2d(arr[i]); provessAction?.Invoke(s); result[i] = geterResultValueFunc(s); } return(result); }
private static STAT[] GetTransiotionStats(Matrix MGKDirectResult) { var statsSize = MGKDirectResult.Columns; var TransoseMGKDirect = MGKDirectResult.Transpose(); List <STAT> TransiotionStats = new List <STAT>(); for (int i = 0; i < statsSize; i++) { STAT s = new STAT(); s.Setd2Stat2d(TransoseMGKDirect.GetRow(i).GetCloneOfData()); TransiotionStats.Add(s); } return(TransiotionStats.ToArray()); }