Skip to content

Commit a3888b3

Browse files
authored
Fix star for SubBasis (#44)
* Fix star for SubBasis * Update test/runtests.jl * Update test/runtests.jl
1 parent 2548ae1 commit a3888b3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/monomial.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,3 +435,6 @@ function SA.coeffs(
435435
return SA.coeffs!(res, cfs, source, target)
436436
end
437437
end
438+
439+
# FIXME this assumes that the basis is invariant under adjoint
440+
SA.star(::SubBasis, coeffs) = SA.star.(coeffs)

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function api_test(B::Type{<:MB.AbstractMonomialIndexed}, degree)
6565
#@test polynomial(i -> 0.0, basis) isa polynomial_type(basis, Float64)
6666
a = MB.algebra_element(ones(length(basis)), basis)
6767
_test_op(MB.implicit, a)
68+
@test SA.star(a) == a
6869
end
6970
mono = x[1]^2 * x[2]^3
7071
p = MB.Polynomial{B}(mono)

0 commit comments

Comments
 (0)