-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
grade selection syntax #101
Comments
grade selection
operation on a Chain type does not return the grade, but rather only the element at the index specified
No, you are mistaken. That is not a julia> grade(v1+v2,0)
𝟎
julia> grade(v1+v2,Val(0))
𝟎 The julia> scalar(v1+v2)
𝟎 Note that you may have to use Grassmann v0.8 or later to reproduce these exact results. |
That still doesn't work for me, I get a method error
I'm importing |
Also, your documentation reads: Taking a projection into a specific grade of a MultiVector is usually written julia> A(0) julia> A(1) julia> A(2) Which is the only example of selecting elements of a grade I can find, and it fails if the type happens to be a |
Are you using
No, converting |
The line which shows this syntax in your documentation is here. |
I see, this is why I don't want to document any features that are works in progress. This package is not v1.0 yet, and is basically my scratch pad which is ever evolving. The syntax for grade selection is not yet firmly settled on a standard and is in flux. |
When getting the elements of a
MultiVector
, you can use parentheses to select the grade, i.e.However, if the type if a
Chain
, then the parentheses act as an indexing operation, and only into the elements that are non-zero in theChain
. Attempting to access the scalar part of aChain
via `(0) returns an index error.There is a work-around for this, it is to wrap the
Chain
in aMultiVector
, but aMultiVector
is (depending on the basis) many times the size of aChain
. It seems to me that this behaviour ofChain
is useful for the internal implementation, but at the user level, the difference between aChain
and aMultiVector
should be abstracted away.The text was updated successfully, but these errors were encountered: