private InitialAnalysMultidimensionalData ReversTransform(InitialAnalysMultidimensionalData IAMIndepended, double[,] eightvector) { double[,] eightvectorClone = new double[eightvector.GetLength(1), IAMIndepended.Xall.GetLength(1)]; for (int r = 0; r < eightvectorClone.GetLength(0); r++) { for (int c = 0; c < eightvectorClone.GetLength(1); c++) { eightvectorClone[r, c] = eightvector[r, c]; } } double[,] X = Matrix.MultiplicMatrix(IAMIndepended.Xall, Matrix.TranspMatrix(eightvectorClone)); InitialAnalysMultidimensionalData result = new InitialAnalysMultidimensionalData(X, -1); if (IAM.n == 2) { double corel = IAM.K[0, 1]; double fi = Math.Atan(2 * corel * IAM.ISA[0].Gx.Q * IAM.ISA[1].Gx.Q / (Math.Pow(IAM.ISA[0].Gx.Q, 2) - Math.Pow(IAM.ISA[1].Gx.Q, 2))) / 2; picture.Image = PaintData.RotateImage(new Bitmap(picture.Image), -fi); } return(result); }
private void BottomValueToolStripMenuItem_Click(object sender, EventArgs e) { try { MinimalDispersValue = Convert.ToDouble(MinimalDispers.Text); } catch { MinimalDispersValue = 0; } if (IAM.n == 2) { double corel = IAM.K[0, 1]; double fi = Math.Atan(2 * corel * IAM.ISA[0].Gx.Q * IAM.ISA[1].Gx.Q / (Math.Pow(IAM.ISA[0].Gx.Q, 2) - Math.Pow(IAM.ISA[1].Gx.Q, 2))) / 2; picture.Image = PaintData.RotateImage(new Bitmap(picture.Image), fi); } double[,] Xallstandart = new double[IAM.Xall.GetLength(0), IAM.Xall.GetLength(1)]; for (int i = 0; i < IAM.Xall.GetLength(0); i++) { for (int j = 0; j < IAM.Xall.GetLength(1); j++) { Xallstandart[i, j] = (IAM.Xall[i, j] - IAM.Ex[j]) /* / IAM.ISA[j].Gx.Q*/; } } double[,] X = Matrix.MultiplicMatrix(Xallstandart, IAM.eightvector); int MaxGroup = -1; for (int j = 0; j < ML.Count; j++) { MaxGroup = Math.Max(MaxGroup, ML[j].Group); } List <int> index = new List <int>(); for (int i = 0; i < IAM.n; i++) { List <double> Data = new List <double>(); for (int j = 0; j < IAM.N; j++) { Data.Add(X[j, i]); } InitialStatisticalAnalys ISA = new InitialStatisticalAnalys(Data, MaxGroup + 1); if (ISA.Dx.Q >= MinimalDispersValue) { ML.Add(ISA); index.Add(ML.Count - 1); undolist.Add(ML[ML.Count - 1].unsortl); } } WraitData.RefreshList(treeView1, ML); IAMIndepended = new InitialAnalysMultidimensionalData(ML, index, -1); IAMIndependedToRevers = new InitialAnalysMultidimensionalData(X, 1); ReversTransformValueToolStripMenuItem.Visible = true; Procent = new double[IAM.n]; for (int c = 0; c < IAM.n; c++) { for (int r = 0; r < IAMIndepended.Xall.GetLength(1); r++) { Procent[c] += Math.Pow(IAM.eightvector[r, c], 2); } Procent[c] *= 100; } DataGridView.Rows.Clear(); SetData(); SetNextData(); }