File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,24 @@ function MA.operate_to!(
127127 return res
128128end
129129
130+ function mstructure (args:: AbstractStarAlgebra... )
131+ for arg in args
132+ @assert arg == first (args)
133+ end
134+ return mstructure (basis (args[1 ]))
135+ end
136+
137+ function MA. operate! (
138+ :: UnsafeAddMul{typeof(*)} ,
139+ res:: AlgebraElement ,
140+ A:: BasisTransformation ,
141+ args:: Vararg{AlgebraElement,N} ,
142+ ) where {N}
143+ mstr = mstructure (algebra (res), algebra .(args)... )
144+ MA. operate! (UnsafeAddMul (mstr), coeffs (res), coeffs .(args)... )
145+ return res
146+ end
147+
130148function MA. operate! (
131149 :: UnsafeAddMul{typeof(*)} ,
132150 res:: AlgebraElement ,
@@ -137,7 +155,7 @@ function MA.operate!(
137155 @assert parent (res) == parent (arg)
138156 end
139157 end
140- mstr = mstructure (basis (res))
158+ mstr = mstructure (basis (res), basis .(args) ... )
141159 MA. operate! (UnsafeAddMul (mstr), coeffs (res), coeffs .(args)... )
142160 return res
143161end
You can’t perform that action at this time.
0 commit comments