diff --git a/src/fixed.jl b/src/fixed.jl index 6621e3c..e836fc9 100644 --- a/src/fixed.jl +++ b/src/fixed.jl @@ -45,7 +45,7 @@ Elements of [`SemisimpleBasis`](@ref). struct SemisimpleElement{P} elements::Vector{P} end -SA.star(p::SemisimpleElement) = SemisimpleElement(SA.star.(p.polynomials)) +SA.star(p::SemisimpleElement) = SemisimpleElement(SA.star.(p.elements)) function Base.getindex(b::SemisimpleBasis, i::Integer) return SemisimpleElement(getindex.(b.bases, i)) diff --git a/src/polynomial.jl b/src/polynomial.jl index 4767dfb..879cfcf 100644 --- a/src/polynomial.jl +++ b/src/polynomial.jl @@ -41,6 +41,16 @@ end abstract type AbstractMonomialIndexed end +""" + struct Polynomial{B<:AbstractMonomialIndexed,M<:MP.AbstractMonomial} + monomial::M + function Polynomial{B}(mono::MP.AbstractMonomial) where {B} + return new{B,typeof(mono)}(mono) + end + end + +Polynomial of basis `FullBasis{B,M}()` at index `monomial`. +""" struct Polynomial{B<:AbstractMonomialIndexed,M<:MP.AbstractMonomial} monomial::M function Polynomial{B}(mono::MP.AbstractMonomial) where {B}