math
math copied to clipboard
[Question] High dimensional algebras multiplication
Can you provide an example on how to accomplish geometric product between two 25-vector, for example?
M=e34589abcdeghlmnopqrvwxyz * e1234567abcdefghijklmorstu= (+/-)e126789fijknpqrstuvwxyz
First, define your 25 basis vectors :
static constexpr auto e1="e1"_direction_positive;
static constexpr auto e2="e2"_direction_positive;
...
Then, do whatever operation you like on them :
auto e34589abcdeghlmnopqrvwxyz=e3*e4*e5*...*ez;
auto e1234567abcdefghijklmorstu=e1*e2*e3*...*eu;
auto M=e34589abcdeghlmnopqrvwxyz*e34589abcdeghlmnopqrvwxyz
/* all this is resolved at compile time */
See https://github.com/godefv/math#example , the dimension does not matter at all, new types are generated by the compiler if needed.