3 ms·
The fact is thay in real world linear algebra code there are distinct mathematical objects that you do want to keep separate and not mix up. It's already too ea
by chpatrick 3y ago
The fact is thay in real world linear algebra code there are distinct mathematical objects that you do want to keep separate and not mix up. It's already too easy to add the wrong vectors or forget to invert something without also making it possible to do nonsense operations.
That being said I can't see why you can't make newtypes over the one geometric algebra type. But at that point, what's the advantage over plain old vectors and matrices?
- Nevermark 3y ago1) Sub-typing a clean general type for all kinds of special purposes. vs. 2) Having to create or acquire lots of separate types for all the specialized types you (or others) need, along with all their operations, probably in inconsistent ways, and leaving potential types missing, including not having the general type. Also, the separate type path does not help you cognitively understand the real relationships between the separately crafted types. A really easy example is the convenience of having a big (unlimited size) integer type that can be parameterized to any size subtype you want. You get all the arithmetic operations across all those fixed sizes for free, because those algorithms are just easily auto optimized versions of the general operations. A good system could even auto optimize for an operation that took two integers of different fixed sizes. Clean concrete closed general types are the powerhouse wonders of the mathematical world. They are just as great for algorithm use. As long as you can subtype.
- chpatrick 3y agoI can certainly see the mathematical appeal but as an end user I'm still not convinced. If you're still dealing with rotations, points lines etc as subtypes, do you care whether they're all implemented internally the same way or as they are now with vectors quaternions matrices etc? Is geometric algebra even more efficient than these or is it purely aesthetic? What I'm saying is, if my code is strongly typed and deals with these various geometric objects, what benefit do I get if they're internally implemented with geometric algebra as opposed to how they are now?
- Nevermark 3y agoIf you have the general form, and subtyping, then you have everything in a simpler interface. And you get all the subtype to subtype operations for free, bug free, since they are all just subtype operations themselves. If you haven’t played around with geometric algebra, you should try it. It is consistent across any. N dimensions. And when you are using it in an application, it’s easier to see why things are related the way they are. You have fewer equations.
- chpatrick 3y agoOK but I already have the subtype to subtype operations available bug-free today. Why do I care if they're implemented in geometric algebra or not, especially if it's less efficient?
- Nevermark 3y agoIf you have what you need, then you have what you need. If you were starting greenfield, geometric algebra probably simplifies more than you would guess, and represents more. When anything gets simpler, more consistent, and more powerful, most of us start having ideas that would never have occurred to us before. Same story as any other significant language and/or notation improvements. It is a mystery to me why it has taken so long to catch on and replace disparate less capable notations. Inertia I guess. Hard to change geometry across education all at once, but piecemeal would be very messy. I don’t know any reason it would be less efficient.