예제 #1
0
파일: table_impl.hpp 프로젝트: UG4/ugcore
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);
}
예제 #2
0
파일: table_impl.hpp 프로젝트: UG4/ugcore
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];
}
예제 #3
0
파일: MtxLP.cpp 프로젝트: kierzek/MUFINS
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;
}