Skip to content

Generalized N-Dimensional Rotors & Decompositions #26

Answered by CaseySanchez
CaseySanchez asked this question in Q&A
Discussion options

You must be logged in to vote

I apologize for the previous false alarm Dr. Fernandes, I can confirm that the code below does in fact work as expected. I've tried to adhere to your GATL-isms, if you will:

template<typename CoefficientType, typename RotorExpression, typename VectorExpression>
auto decompose(clifford_expression<CoefficientType, RotorExpression> const &rotor, clifford_expression<CoefficientType, VectorExpression> const &vector)
{
    auto const rotor_bivector = take_grade(rotor, 2);
    auto const rotor_vector = dual(rotor_bivector);
    auto const rotor_project = project(rotor_vector, vector);

    auto const twist = unit(take_grade(rotor, 0) + undual(rotor_project));
    auto const swing = rotor * ~twis…

Replies: 3 comments 3 replies

Comment options

CaseySanchez
Apr 14, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

CaseySanchez
Apr 15, 2022
Collaborator Author

You must be logged in to vote
2 replies
@laffernandes
Comment options

@CaseySanchez
Comment options

CaseySanchez Apr 15, 2022
Collaborator Author

Comment options

CaseySanchez
Apr 17, 2022
Collaborator Author

You must be logged in to vote
1 reply
@laffernandes
Comment options

Answer selected by CaseySanchez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants