GF2::Matrix — Append to a Bit-Matrix

Appends a bit-matrix with one or more columns to right

constexpr Matrix &append(const Vector &v);      (1)
constexpr Matrix &append(const Matrix &V);      (2)

Matrix join(const Matrix& M, const Vector& v);  (3)
Matrix join(const Matrix& M, const Vector& V);  (4)
1 Matrix \(M\) is augmented in place to become \(M|v\).
2 Matrix \(M\) is augmented in place to become \(M|V\).
3 Returns a new matrix that is the augmented \(M|v\).
4 Returns a new matrix that is the augmented \(M|V\).
The number of rows in v and V must match the number of rows in M.
Example
    std::size_t n_rows = 12;
    auto M = GF2::Matrix<>::ones(n_rows);
    auto v = GF2::Vector<>::zeros(n_rows);
    auto V = GF2::Matrix<>::zeros(n_rows, 5);
    auto A = GF2::join(M,v);
    auto B = GF2::join(M,V);
    GF2::print(M, A, B);
    return 0;
Output
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
111111111111    1111111111110   11111111111100000
See Also

replace