GeometryTypes.jl icon indicating copy to clipboard operation
GeometryTypes.jl copied to clipboard

Make vertices(::Simplex) return an SVector

Open CarpeNecopinum opened this issue 5 years ago • 1 comments

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.

CarpeNecopinum avatar Oct 18 '19 09:10 CarpeNecopinum

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.

CarpeNecopinum avatar Oct 21 '19 10:10 CarpeNecopinum