-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Exterior algebra: ⋆
is not a unary operator
#17480
Comments
You can call the function form of julia> (*)(1)
1 |
We are talking about What does work for
|
I'm fine with letting |
What about making unary On a more relevant note, how about making |
@TotalVerb, I think @JeffBezanson's perspective from way back was that |
now we can pass comprehensions in functions, these should be reduction operators, i.e. |
I can get behind aliases like const ∑ = sum
const ∏ = prod
⋀(x) = reduce(∧, x) # all?
⋁(x) = reduce(∨, x) # any?
⋃(x) = reduce(union, x)
⋂(x) = reduce(intersect, x) though the empty case is troublesome, as usual. |
wrt sets, Union( ∅, ∅ ) is Union( ∅ ) is (∅) which I am free to write this way () # math, not as a tuple ⋃(x) = reduce(union, x)
⋂(x) = reduce(intersect, x)
⋃() = Void()
⋂() = Void()
# and if it is useful to cover reducing over an empty collection, here are two
const emptyTuple = ()
const zeroElements = []
⋃(emptyTuple) = emptyTuple
⋂(emptyTuple) = emptyTuple
⋃(zeroElements) = zeroElements
⋂(zeroElements) = zeroElements |
Fixed in #31604 |
I'm currently writing a library for exterior algebra on manifolds and need to define the Hodge star operator. In particular, the Hodge star maps a
k
-form on ann
-dimensional manifold to ann-k
-form. Is there any use-case which disagrees with⋆
being a unary operator? If not and it's a quick fix, could fulfilling this request be part of the 0.5 release?The text was updated successfully, but these errors were encountered: