Skip to content

Commit

Permalink
Fix FullDimensionalFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
giopaglia committed Nov 14, 2024
1 parent 928c1b0 commit bbe0c6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/utils/algebras/frames/full-dimensional-frame/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ struct FullDimensionalFrame{N,W<:AbstractWorld} <: AbstractDimensionalFrame{N,W}
W = OneWorld
FullDimensionalFrame{0,W}(channelsize)
end
function FullDimensionalFrame(channelsize::Tuple{Int}, W::Type{<:AbstractWorld} = Interval{Int})
function FullDimensionalFrame(channelsize::Tuple{Int}, W::Union{Nothing,Type{<:AbstractWorld}} = nothing)
if isnothing(W)
@warn "Unknown world type. Defaulting to Interval{Int}."
W = Interval{Int}
end
FullDimensionalFrame{1,W}(channelsize)
end
function FullDimensionalFrame(channelsize::Tuple{Int,Int}, W::Type{<:AbstractWorld} = Interval2D{Int})
function FullDimensionalFrame(channelsize::Tuple{Int,Int}, W::Union{Nothing,Type{<:AbstractWorld}} = nothing)
if isnothing(W)
@warn "Unknown world type. Defaulting to Interval2D{Int}."
W = Interval2D{Int}
end
FullDimensionalFrame{2,W}(channelsize)
end
function FullDimensionalFrame(channelsize::Vararg{Int,N}) where {N}
Expand Down

0 comments on commit bbe0c6a

Please sign in to comment.