You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
I might be misunderstanding the intention of decompose, but my guess is that these should work.
julia> s =Simplex{3,Point}(Point(1,0,0), Point(0,1,0), Point(0,0,1))
3-element GeometryTypes.Simplex{3,GeometryTypes.Point}:
[1, 0, 0]
[0, 1, 0]
[0, 0, 1]
julia>decompose(Simplex{2}, s)
(GeometryTypes.Point[[1, 0, 0], [0, 1, 0]], GeometryTypes.Point[[0, 1, 0], [0, 0, 1]], GeometryTypes.Point[[0, 0, 1], [1, 0, 0]])
julia>decompose(Simplex{1}, s)
ERROR: MethodError: GeometryTypes.Simplex{1,GeometryTypes.Point}(::GeometryTypes.Point{3,Int64}) is ambiguous. Candidates:
(::Type{GeometryTypes.Simplex{1,T}})(x::T) where T in GeometryTypes at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/simplices.jl:16
(::Type{GeometryTypes.Simplex{S,T}})(x) where {S, T} in GeometryTypes at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/simplices.jl:10
(::Type{S})(sv::StaticArrays.StaticArray{Tuple{N},T,1}where T where N) where S<:GeometryTypes.Simplexin GeometryTypes at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/simplices.jl:6
Possible fix, define
(::Type{GeometryTypes.Simplex{1,T<:(StaticArrays.StaticArray{Tuple{N},T,1} where T where N)}})(::T<:(StaticArrays.StaticArray{Tuple{N},T,1} where T where N))
Stacktrace:
[1] decompose(::Type{GeometryTypes.Simplex{1,T} where T}, ::GeometryTypes.Simplex{3,GeometryTypes.Point}) at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/decompose.jl:139
julia>decompose(Point, s)
ERROR: MethodError: no method matching decompose(::Type{GeometryTypes.Point}, ::GeometryTypes.Simplex{3,GeometryTypes.Point})
Closest candidates are:decompose(::Type{SV<:(StaticArrays.StaticArray{Tuple{N},T,1} where T where N)}, ::GeometryTypes.AbstractGeometry{N,T}, ::Any...) where {SV<:(StaticArrays.StaticArray{Tuple{N},T,1} where T where N), N, T} at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/decompose.jl:8decompose(::Type{GeometryTypes.Simplex{3,T1}}, ::GeometryTypes.Simplex{N,T2}) where {N, T1, T2} at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/decompose.jl:92decompose(::Type{GeometryTypes.Simplex{3,T} where T}, ::GeometryTypes.Simplex{N,T}) where {N, T} at /Users/goretkin/playgrounds/vamp/packages/v0.6/GeometryTypes/src/decompose.jl:106...
The text was updated successfully, but these errors were encountered:
decompose pretty much grew organically, so whenever someone needed a primitive to decompose into some other primitive, they implemented it ;) If you need this functionality, you're very welcome to implement it! If you need any guidance, let me know!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I might be misunderstanding the intention of
decompose
, but my guess is that these should work.The text was updated successfully, but these errors were encountered: