Skip to content

Commit

Permalink
Remove vcat(::MatElem, ::MatElem) and hcat(::MatElem, ::MatElem)
Browse files Browse the repository at this point in the history
These methods are never called because there are
`vcat(::MatrixElem{T}...) where T <: NCRingElement`
`hcat(::MatrixElem{T}...) where T <: NCRingElement`
  • Loading branch information
joschmitt committed Apr 16, 2024
1 parent e2b898a commit a305b7c
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6107,50 +6107,6 @@ end
#
###############################################################################

@doc raw"""
hcat(a::MatElem, b::MatElem)
Return the horizontal concatenation of $a$ and $b$. Assumes that the
number of rows is the same in $a$ and $b$.
"""
function hcat(a::MatElem, b::MatElem)
nrows(a) != nrows(b) && error("Incompatible number of nrows in hcat")
c = similar(a, nrows(a), ncols(a) + ncols(b))
n = ncols(a)
for i = 1:nrows(a)
for j = 1:ncols(a)
c[i, j] = a[i, j]
end
for j = 1:ncols(b)
c[i, n + j] = b[i, j]
end
end
return c
end

@doc raw"""
vcat(a::MatElem, b::MatElem)
Return the vertical concatenation of $a$ and $b$. Assumes that the
number of columns is the same in $a$ and $b$.
"""
function vcat(a::MatElem, b::MatElem)
ncols(a) != ncols(b) && error("Incompatible number of columns in vcat")
c = similar(a, nrows(a) + nrows(b), ncols(a))
n = nrows(a)
for i = 1:nrows(a)
for j = 1:ncols(a)
c[i, j] = a[i, j]
end
end
for i = 1:nrows(b)
for j = 1:ncols(a)
c[n + i, j] = b[i, j]
end
end
return c
end

@doc raw"""
vcat(A::MatrixElem{T}...) where T <: NCRingElement -> MatrixElem
Expand Down

0 comments on commit a305b7c

Please sign in to comment.