Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/spaces/vectorspaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ spaces `V₁`, `V₂`, ... Note that all the individual spaces should have the s
[`isdual`](@ref), as otherwise the direct sum is not defined.
"""
function ⊕ end
⊕(V₁::VectorSpace, V₂::VectorSpace) = ⊕(promote(V₁, V₂)...)
⊕(V::Vararg{VectorSpace}) = foldl(⊕, V)
⊕(V₁::ElementarySpace, V₂::ElementarySpace) = ⊕(promote(V₁, V₂)...)
⊕(V::Vararg{ElementarySpace}) = foldl(⊕, V)
const oplus = ⊕

"""
Expand Down
1 change: 1 addition & 0 deletions test/spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ println("------------------------------------")
@test Base.eltype(P) == Base.eltype(typeof(P)) == typeof(V1)
@test eltype(collect(P)) == typeof(V1)
@test collect(P) == [V1, V2, V3, V4]
@test_throws MethodError P ⊕ P
end

@timedtestset "ProductSpace{SU₂Space}" begin
Expand Down
Loading