Skip to content

Commit

Permalink
FakeFmpqMat: don't store rows & cols
Browse files Browse the repository at this point in the history
They are already stored in the wrapped ZZMatrix
  • Loading branch information
fingolfin committed Feb 3, 2025
1 parent 2bb83e9 commit 4f3330d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/HeckeTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ Used predominantly to represent bases of orders in absolute number fields.
mutable struct FakeFmpqMat
num::ZZMatrix
den::ZZRingElem
rows::Int
cols::Int

function FakeFmpqMat()
z = new()
Expand All @@ -538,8 +536,6 @@ mutable struct FakeFmpqMat
z = new()
z.num = x
z.den = y
z.rows = nrows(x)
z.cols = ncols(x)
if !simplified
simplify_content!(z)
end
Expand All @@ -550,8 +546,6 @@ mutable struct FakeFmpqMat
z = new()
z.num = x[1]
z.den = x[2]
z.rows = nrows(x[1])
z.cols = ncols(x[1])
if !simplified
simplify_content!(z)
end
Expand All @@ -563,15 +557,11 @@ mutable struct FakeFmpqMat
z = new()
z.num = x
z.den = one(ZZ)
z.rows = nrows(x)
z.cols = ncols(x)
return z
end

function FakeFmpqMat(x::QQMatrix)
z = new()
z.rows = nrows(x)
z.cols = ncols(x)

n, d = _fmpq_mat_to_fmpz_mat_den(x)

Expand Down
2 changes: 0 additions & 2 deletions src/LinearAlgebra/FakeFmpqMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ function Base.deepcopy_internal(x::FakeFmpqMat, dict::IdDict)
z = FakeFmpqMat()
z.num = Base.deepcopy_internal(x.num, dict)
z.den = Base.deepcopy_internal(x.den, dict)
z.rows = nrows(x)
z.cols = ncols(x)
return z
end

Expand Down

0 comments on commit 4f3330d

Please sign in to comment.