You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because we currently disallow bare integer indices for AbstractCliffordNumber instances, we could rework the indexing scheme to allow for integer indices if the inputs to getindex are passed through to BitIndex:
This is a relatively naive definition; we may want to perform checking so that a BitIndex of a grade constrained to be zero by the type of x automatically returns zero without performing any construction.
The text was updated successfully, but these errors were encountered:
Correction: this might be a breaking change, and not the good kind.
There is a default definition of Base.getindex(::Number)Base.getindex(::Number, ::Int) that returns the Number argument if the integer argument is equal to 1 (or if no argument is supplied). Defining this method may break some code that relies on the fact that AbstractCliffordNumber behaves as a scalar.
Because we currently disallow bare integer indices for
AbstractCliffordNumber
instances, we could rework the indexing scheme to allow for integer indices if the inputs togetindex
are passed through toBitIndex
:This is a relatively naive definition; we may want to perform checking so that a
BitIndex
of a grade constrained to be zero by the type ofx
automatically returns zero without performing any construction.The text was updated successfully, but these errors were encountered: