-
-
Couldn't load subscription status.
- Fork 35
Open
Description
The LinearAlgebra module exports two unicode operators, like this:
const ⋅ = dot
const × = crossWould it be possible to change these to generic functions?
⋅(u,v) = dot(u,v)
×(u,v) = cross(u,v)The reason is that \cdot does not always have the interpretation of a dot product. For example, in Catlab we use it as a generic composition operator. Likewise, \times is not always a cross product; in many contexts it conventionally represents the cartesian product of sets or types. By using generic functions instead of aliases, it would at least be possible to override these operators for specific types when a different interpretation makes sense.
It would be better still to have typing, e.g.
×(u::AbstractVector, v::AbstractVector) = cross(u,v)cscherrer
Metadata
Metadata
Assignees
Labels
No labels