Skip to content

Commit

Permalink
Remove aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 14, 2024
1 parent de742dc commit 88e0c2b
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/mstructures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,6 @@ function MA.operate!(op::UnsafeAddMul, res, b, c, args::Vararg{Any, N}) where {N
return res
end

_aggregate_constants(constant, non_constant) = (constant, non_constant)

function _aggregate_constants(constant, non_constant, α, args::Vararg{Any,N}) where {N}
return _aggregate_constants(constant * α, non_constant, args...)
end

function _aggregate_constants(constant, non_constant, c::AbstractCoefficients, args::Vararg{Any,N}) where {N}
return _aggregate_constants(constant, (non_constant..., c), args...)
end

function MA.operate!(
op::UnsafeAddMul,
mc::AbstractCoefficients,
args::Vararg{Any,N},
) where {N}
constant, non_constant = _aggregate_constants(One(), tuple(), args...)
return operate_with_constant!(op, mc, constant, non_constant...)
end

struct DiracMStructure{Op} <: MultiplicativeStructure
op::Op
end
Expand Down

0 comments on commit 88e0c2b

Please sign in to comment.