/// <summary> /// Transforms all rows. /// </summary> public void TransformAllRows() { this.OriginalMatrix = new DataMatrix(this.UntransformedAsciiFilePath); Trace.WriteLine(string.Format("Original matrix ascii import completed, imported {0} rows.", this.OriginalMatrix.Rows.Count)); var matrixTrans = new DataMatrix(MatrixType.Transformed, this.OriginalMatrix.ColumnCount); // transform row by row for (int i = 0; i < this.OriginalMatrix.Rows.Count; i++) { // use the required level var groups = this.OriginalMatrix.Rows[i].CalculateTransformedGroups(this.OriginalMatrix.MaxLevelCount); matrixTrans.Rows.Add(new DataRow(groups)); } // create output ascii file for transformed matrix matrixTrans.WriteToAsciiFile(this.TransformedAsciiFilePath); this.TransformedMatrix = matrixTrans; }