Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Make vertices(::Simplex) return an SVector #184

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

CarpeNecopinum
Copy link
Contributor

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
Copy link
Contributor Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants