Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Aug 21, 2024
1 parent 43d1707 commit 8a6e2dd
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ function MA.operate_to!(
::typeof(*),
args::Vararg{AlgebraElement,N},
) where {N}
for arg in args
@assert parent(res) == parent(arg)
end
mstr = mstructure(basis(res))
mstr = mstructure(parent(res), parent.(args)...)
MA.operate_to!(coeffs(res), mstr, coeffs.(args)...)
return res
end
Expand All @@ -158,23 +155,9 @@ end
function MA.operate!(
::UnsafeAddMul{typeof(*)},
res::AlgebraElement,
A::BasisTransformation,
args::Vararg{AlgebraElement,N},
) where {N}
mstr = mstructure(algebra(res), algebra.(args)...)
MA.operate!(UnsafeAddMul(mstr), coeffs(res), coeffs.(args)...)
return res
end

function MA.operate!(
::UnsafeAddMul{typeof(*)},
res::AlgebraElement,
args::Vararg{AlgebraElement,N},
) where {N}
for arg in args
@assert parent(res) == parent(arg)
end
mstr = mstructure(basis(res), basis.(args)...)
mstr = mstructure(parent(res), parent.(args)...)
MA.operate!(UnsafeAddMul(mstr), coeffs(res), coeffs.(args)...)
return res
end
Expand Down

0 comments on commit 8a6e2dd

Please sign in to comment.