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

Permutation handedness #2413

Merged
merged 7 commits into from
Dec 27, 2019

Conversation

eggrobin
Copy link
Member

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
{PFT::YXZ, PTF::YXZ}};
return PTF(inverse.at(coordinate_permutation_));
if constexpr (std::is_same_v<CoordinatePermutation, EvenPermutation>) {
switch (coordinate_permutation_) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preference for an array instead of a switch.

return OrthogonalMap<FromFrame, ToFrame>(
Determinant(),
Rotation<FromFrame, ToFrame>(quaternion.at(coordinate_permutation_)));
Rotation<FromFrame, ToFrame>(quaternion[0b111 &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give a name to this mask and declare it next to INDEX etc.

0x3 &
(static_cast<int>(coordinate_permutation_) >> (coordinate * 2))];
result[coordinate] =
r3_element[0b11 & (static_cast<int>(coordinate_permutation_) >>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, name the mask.

Permutation<Geocentric, Selenocentric>(
Permutation<Geocentric, Selenocentric>::YXZ).Forget()),
Permutation<Geocentric, Selenocentric>(EvenPermutation::YXZ)
.Forget()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might fit on the previous line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

auto const composition_as_orthogonal_maps =
left.Forget() * right.Forget();
for (Length l = 1 * Metre; l < 4 * Metre; l += 1 * Metre) {
// In C++20 we could have template parameters on the lambda which
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this comment a TODO.

Sorry, something went wrong.

@pleroy pleroy added the LGTM label Dec 27, 2019
@eggrobin eggrobin merged commit daf3bbf into mockingbirdnest:master Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants