GeometryTypes.jl
GeometryTypes.jl copied to clipboard
Make vertices(::Simplex) return an SVector
As noted in #127, all other variants of vertices
return something <: AbstractVector
.
To avoid runtime overhead, this PR uses an SVector to conform to that interface. Additionally, a Simplex can now be constructed from an SVector, deleteat
has been extended to support SVectors
and a type instability that occurred when calling vertexmat
with an SVector has been fixed.
Open for comments on e61718d. To pass the tests, I have to allow constructing a Simplex from a StaticVector of points if deleteat
can return one. But Simplex already had a constructor taking a StaticVector, which however interpreted that vector as a single point.
So I added a constructor that takes nested arrays and interprets them as an array of points again.