void matrix<T>::insertRowUnsized(const vector<T> &vec) { // Add row to end, and resize matrix (add columns) if needed if (vec.size() > this->dims[1]) addCols(vec.size()-this->dims[1]); this->data.insert(this->data.end(),vec.begin(),vec.end()); // If row too short, finish filling with 0's if (vec.size() < this->dims[1]) this->data.insert(this->data.end(),this->dims[1]-vec.size(),(T)0); this->dims[0]++; }
void matrix<T>::insertRowUnsized(T* vec, int length) { // Add row to end, and resize matrix (add columns) if needed if (length > this->dims[1]) addCols(length-this->dims[1]); this->data.insert(this->data.end(),vec,vec+length); // If row too short, finish filling with 0's if (length < this->dims[1]) this->data.insert(this->data.end(),this->dims[1]-length,(T)0); this->dims[0]++; }
col_studentId->Name = L"studentId"; col_studentId->AutoSizeMode = System::Windows::Forms::DataGridViewAutoSizeColumnMode::Fill; // column course col_course->HeaderText = L"Course"; col_course->Name = L"course"; col_course->AutoSizeMode = System::Windows::Forms::DataGridViewAutoSizeColumnMode::Fill; // columns app columns = gcnew array<System::Windows::Forms::DataGridViewTextBoxColumn^> (2); columns[0] = col_studentId; columns[1] = col_course; // dataGrid data_grid = dataGrid; colDelegate = gcnew addCols(this, &Worker::addColsMethod); rowDelegate = gcnew addRow(this, &Worker::addRowMethod); clearDelegate = gcnew clearRow(this, &Worker::clearRowMethod); data_grid->Invoke(colDelegate, data_grid, columns); data_grid->Invoke(clearDelegate, data_grid); // excluded lists excluded = gcnew array<String^> {"MATH010", "MATH003", "MATH115", "MATH116", "MATH143", "MATH144", "MATH133", "MATH134"}; // input files this->file_audit = audit; this->file_master = master; // database queries this->dbQuery = (gcnew SQLiteCommand());