Skip to content
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

Multivector Coefficients #5

Open
RobinKa opened this issue Jun 6, 2020 · 0 comments
Open

Multivector Coefficients #5

RobinKa opened this issue Jun 6, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@RobinKa
Copy link
Owner

RobinKa commented Jun 6, 2020

Right now only tf's dtypes as coefficients are supported. Multivector coefficients could be convenient for example to use dual numbers for automatic differentiation (although this is already possible without them since we are using tensorflow of course).

Possible implementation

  • N blades in the algebra
  • For each blade, we have a coefficient that is a multivector itself, so an [N, N] tensor.
  • Take elementwise geometric product of N multivector-coefficients with the N blades to get a single multivector
ga = tfga.GeometricAlgebra(metric=[0])

# Coefficient 5 + e_0 for all blades
# coefficients.shape: [2, 2]
# [5 + e_0, 5 + e_0]
coefficients = tf.tile(tf.expand_dims(ga.e0 + 5.0 * ga.e(""), axis=0), [ga.num_blades, 1])

# blades.shape: [2, 2]
# [1, e_0]
blades = ga.blade_mvs

# mv = [5 + e_0, 5 + e_0] elementwise geom. prod. [1, e_0] = [5 + e_0, 5 e_0]
# mv.shape: [2, 2]
mv = ga.geom_prod(coefficients, blades)
@RobinKa RobinKa added the enhancement New feature or request label Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant