}// createIndivLine private MatCellItems createVariableLine() { if (m_defaultitem == null) { MatCellItem tt = new MatCellItem(); tt.TotalHeight = this.MatItemHeight; tt.TotalWidth = this.MatItemWidth; m_defaultitem = tt; } double[,] xdata = this.InitialData; int nr = xdata.GetLength(0); if (nr < 1) { return null; } var line = new MatCellItems(); MatCellItem tx = m_defaultitem; line.Add(tx); // for (int j = 0; j < nr; ++j) { line.Add(tx); }// j // return line; }// createVariableLine
}// createVariableLine private List<MatCellItems> getIndivsCells() { List<MatCellItems> cells = new List<MatCellItems>(); if ((m_varcells == null) || (m_indivcells == null) || (m_datacells == null)) { return cells; } var ff = createIndivsLine(); if (ff != null) { cells.Add(ff); } if (m_defaultitem == null) { MatCellItem tt = new MatCellItem(); tt.TotalHeight = this.MatItemHeight; tt.TotalWidth = this.MatItemWidth; m_defaultitem = tt; } int[] colindex = this.ColIndex; int[] rowindex = this.RowIndex; double[,] xdata = this.InitialData; int nr = xdata.GetLength(0); int nv = xdata.GetLength(1); if ((nr > 0) && (nv > 0) && (colindex.Length >= nv) && (rowindex.Length >= nr)) { int width = this.MatItemWidth; if (width < 10) { width = 10; } MatDisplayMode mode = this.MatriceDisplayMode; MatCellItems cur = new MatCellItems(); cur.Add(m_defaultitem); for (int i = 0; i < nv; ++i) { int icol = colindex[i]; MatCellItem item = m_varcells[icol]; item.CellType = MatItemType.typeVar; item.TotalWidth = width; cur.Add(item); }// i cells.Add(cur); // for (int i = 0; i < nr; ++i) { MatCellItems line = new MatCellItems(); // int irow = rowindex[i]; MatCellItem tx = m_indivcells[irow]; tx.CellType = MatItemType.typeInd; tx.TotalWidth = width; line.Add(tx); // for (int j = 0; j < nv; ++j) { int icol = colindex[j]; MatCellItem item = m_datacells[irow, icol]; item.DisplayMode = mode; item.TotalWidth = width; line.Add(item); }// j if (this.HasSummary && (m_refclasses != null)) { line.Add(m_defaultitem); MatCellItem item = m_refclasses[irow]; item.TotalWidth = width; line.Add(item); } // cells.Add(line); }// i }// nr && nv return cells; }// getIndivCells
}// getVariablesCells private MatCellItems createIndivsLine() { if (m_defaultitem == null) { MatCellItem tt = new MatCellItem(); tt.TotalHeight = this.MatItemHeight; tt.TotalWidth = this.MatItemWidth; m_defaultitem = tt; } double[,] xdata = this.InitialData; int nv = xdata.GetLength(1); if (nv < 1) { return null; } var line = new MatCellItems(); MatCellItem tx = m_defaultitem; line.Add(tx); // for (int j = 0; j < nv; ++j) { line.Add(tx); }// j if (this.HasSummary && (m_refclasses != null)) { line.Add(tx); } // return line; }// createIndivLine