tBuLi / kingdon

A symbolically optimized and pythonic Clifford (geometric) algebra library named after none other than William Kingdon Clifford.
https://tbuli.github.io/teahouse/
MIT License
45 stars 5 forks source link

Ganja upgrade + register expressions #27

Closed tBuLi closed 1 year ago

tBuLi commented 1 year ago

This PR features some small but important upgrades to the ganja code, and will include a huge performance boost by allowing users to register their own expressions for numba (numba) compilation using a simple decorator:

alg = Algebra(3, 0, 1)

@alg.register
def myfunc(a, b, c):
    return a >> b + c

For more complicated expressions, this will give tremendous speed-ups, especially in combination with numba.

Todo: