Skip to content

Commit

Permalink
fix(matrices): fix involutory eltype
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 9, 2024
1 parent 277cd8e commit 30feb76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/matrices/involutory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ size(A::Involutory) = (A.n, A.n)
@boundscheck checkbounds(A, i, j)

# size and hilbert element
n = A.n
n = T(A.n)
element = A.M[i, j]

# compute element
Expand All @@ -45,13 +45,15 @@ size(A::Involutory) = (A.n, A.n)
element = d * element
end

# update element if i > 1
if i > 1
for k = 1:i-1
d = -(n + k) * (n - k) * d / (k * k)
end

element = d * element
element = T(d) * element
end

return T(element)
# return
return element
end

0 comments on commit 30feb76

Please sign in to comment.