-
Notifications
You must be signed in to change notification settings - Fork 3
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
Listing some undocumented interfaces found in base #9
Comments
That's a very good list! I have the "you get these methods" part of interfaces implemented on a branch, but it's not yet merged into main. Still needs some tests! I've also thought about whether (and how) this package should have these kinds of existing interfaces as part of a checkable set of default interfaces. It's sometimes a bit unclear, because having a fallback definition actually throwing an A similar list can probably be done for the |
The "you get these methods" list will always be incomplete, but I still think it's good to have.
Yes, that would be nice to have. |
Of course - the "you get these methods" list is purely intended as a "we guarantee to support at least these calls", not as an exhaustive list of what technically works. Otherwise it could be automated via reflection. |
The most prominent interfaces defined in base are listed in the documentation. Here are some others:
Rounding
Define
MyType <: Real
Base.round(::MyType, ::RoundingMode)
Get
round(::Type{T}, ::MyType, ::RoundingMode)
round(::Type{T}, ::MyType)
floor(::Type{T}, ::MyType)
ceil(::Type{T}, ::MyType)
trunc(::Type{T}, ::MyType)
round(::MyType)
floor(::MyType)
ceil(::MyType)
trunc(::MyType)
Sorting
Define
Base.isless(::MyType, ::MyType)
Get
issorted(::AbstractVector{MyType})
sort(::AbstractVector{MyType}; kw...)
sort!(::AbstractVector{MyType}; kw...)
sortperm(::AbstractVector{MyType}; kw...)
sortperm!(::AbstractVector{<:Integer}, ::AbstractVector{MyType}; kw...)
partialsort(::AbstractVector{MyType}; kw...)
partialsort!(::AbstractVector{MyType}; kw...)
partialsortperm(::AbstractVector{MyType}; kw...)
partialsortperm!(::AbstractVector{<:Integer}, ::AbstractVector{MyType}; kw...)
The text was updated successfully, but these errors were encountered: