-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CsVec constructors #275
CsVec constructors #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's debate a bit on the naming of new_sorted
vs new_unsorted
vs new_from_unsorted
, and maybe remove new_
, and it'll be done.
Thanks!
0fcc741
to
6e3888e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now, thanks a lot!
This is the vector analouge to #274
The new API consists of
new
: Constructors which panics on failuretry_new
: Returns all buffers and the errornew_sorted
: A constructors that may sort the indices and datanew_unchecked
: Does zero checking of constraintsInternal:
new_trusted
: The internal version ofnew_unchecked
A bunch of the other constructors were removed. These can be expressed in some form of the above. The
unsafe
view constructors are removed in preference tonew_unchecked
, where the caller must ensure valid lifetimesFixes #273