void MatrixOps<T>::SetSubMatrix (const Matrix<T> *const matrix_dst, ssi_size_t start_dst, ssi_size_t start_src, MATRIX_DIMENSION dimension, ssi_size_t number, const Matrix<T> *const matrix_src) { switch (dimension) { case MATRIX_DIMENSION_ROW: SSI_ASSERT (matrix_dst->cols == matrix_src->cols); SetSubMatrix (matrix_dst, start_dst, 0, start_src, 0, number, matrix_dst->cols, matrix_src); break; case MATRIX_DIMENSION_COL: SSI_ASSERT (matrix_dst->rows == matrix_src->rows); SetSubMatrix (matrix_dst, 0, start_dst, 0, start_src, matrix_dst->rows, number, matrix_src); break; } }
void MatrixOps<T>::SetSubMatrix (const Matrix<T> *const matrix, ssi_size_t start, MATRIX_DIMENSION dimension, const Matrix<T> *const submatrix) { switch (dimension) { case MATRIX_DIMENSION_ROW: SSI_ASSERT (matrix->cols == submatrix->cols); SetSubMatrix (matrix, start, 0, submatrix); break; case MATRIX_DIMENSION_COL: SSI_ASSERT (matrix->rows == submatrix->rows); SetSubMatrix (matrix, 0, start, submatrix); break; } }
void AddColRow(const cDVector& theColRow, cDMatrix& theMat) { uint myNRow = theMat.GetNRows() ; uint myNCol = theMat.GetNCols() ; uint mySize = theColRow.GetSize() ; if ( (myNRow != myNCol) || (myNRow + 1 != mySize) ) throw cOTError("Wrong sizes in AddColRow") ; cDMatrix mySrcMatrix = theMat ; theMat.ReAlloc(mySize, mySize) ; SetSubMatrix(mySrcMatrix, 0, 0, theMat) ; for (register uint i = 0 ; i < mySize ; i++) theMat[i][mySize-1] = theMat[mySize-1][i] = theColRow[i] ; }
void MatrixOps<T>::SetSubMatrix (const Matrix<T> *const matrix, ssi_size_t row, ssi_size_t col, const Matrix<T> *const submatrix) { SetSubMatrix (matrix, row, col, 0, 0, submatrix->rows, submatrix->cols, submatrix); }