Table<T>::Table(size_t numRows, size_t numCols) : m_numRows(0), m_numCols(0) { m_defaultColSeperator = ' '; m_defaultRowSeperator = ' '; m_defaultColAlignment = 'l'; add_rows(numRows); add_cols(numCols); }
T& Table<T>::operator() (size_t rowInd, size_t colInd) { if(rowInd >= num_rows()) add_rows((rowInd + 1) - num_rows()); if(colInd >= num_cols()) add_cols((colInd + 1) - num_cols()); return *m_data[rowInd][colInd]; }
int MtxLP::addCol(string name, double lb, double ub){ int i = add_cols(1); set_col_name(i, name.data()); setColBnds(name, lb, ub); return i; }