matrice augmenter
This commit is contained in:
@@ -136,6 +136,25 @@ bool Matrix::IsInversed() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Matrix::Augmenter(const Matrix& droite) {
|
||||
assert(droite.m_Lignes == m_Lignes);
|
||||
Matrix temp{m_Lignes, m_Colonnes + droite.m_Colonnes};
|
||||
|
||||
for (std::size_t i = 0; i < m_Lignes; i++) {
|
||||
for (std::size_t j = 0; j < m_Colonnes; j++) {
|
||||
temp.at(i, j) = at(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < m_Lignes; i++) {
|
||||
for (std::size_t j = 0; j < droite.m_Colonnes; j++) {
|
||||
temp.at(i, j + m_Colonnes) = droite.at(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
*this = temp;
|
||||
}
|
||||
|
||||
bool Matrix::operator==(const Matrix& other) const {
|
||||
if (m_Lignes != other.m_Lignes || m_Colonnes != other.m_Colonnes)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user