chakravala / Grassmann.jl

⟨Grassmann-Clifford-Hodge⟩ multilinear differential geometric algebra
https://grassmann.crucialflow.com
GNU Affero General Public License v3.0
461 stars 40 forks source link

Question: Extracting floating point values from coefficients #100

Open mw95710 opened 2 years ago

mw95710 commented 2 years ago

Is there a function or a way to extract a scalar as a floating point number for further linear algebra computations? For instance, if I have a diagonal matrix [2.3v 0.0v; 0.0v 2.3v], is there a way to extract the matrix [2.3 0.0; 0.0 2.3] with type Float64 so I can use built-in functions in LinearAlgebra package such as eig() or inv()?

Thank you

chakravala commented 2 years ago

Yes, I have some functionality like that built-in and some that's private and not comitted officially. If you or your company or research grant pays me for support, then we might be able to work something out. I'm not a public servant.

Orbots commented 2 years ago

@mw95710

you can access the .v property directly. Use broadcasting to get what you want.

(x->x.v).([2.3v 0.0v; 0.0v 2.3v])