Skip to content

Multivector Coefficients #5

@RobinKa

Description

@RobinKa

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions