I know for sure how to calculate a cross product myself, but usually I tree to use the standard library where possible.
I am aware that std::linalg
is still in development so this might already be the reason, but even blas
seems not to have that.
Is there really no cross product defined in std::linalg
and, if yes, is there a reason for that?
In Python there is numpy.linalg.cross
and I assumed that something similar exists basically in every linear algebra library.
std::linalg is based on the dense BLAS as specified in Chapter 2 of the BLAS Technical Forum Standard ( https://www.netlib.org/blas/blast-forum/chapter2.pdf ), and focuses on the subset of routines that appear in the "Reference BLAS" with its core of BLAS 1, 2, and 3 routines (source: Section 9.1 of the std::linalg main proposal P1673: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1673r13.html ). Vector cross products are not in the BLAS Standard.
Sections 6 - 10 of P1673 clarify std::linalg's design. Section 9 in particular explains "What we exclude from the design" and why.
FYI, the version of P1673 that was voted into the C++ Working Draft was R13.