[Possible Bug] PlainObject in some decompositons but not others
Summary
For some decompositions the typedef PlainObject exists, but in others it does not.
In the godbolt below, Householder QR does not have a PlainObject, but Partial pivot LU and Full pivot QR does.
// Partial Piv LU Plain Type: Eigen::Matrix<double, -1, -1>
Eigen::MatrixXd A = Eigen::MatrixXd::Random(5, 5);
std::cout << "Partial Piv LU Plain Type: " <<
type_name<typename std::decay_t<decltype(A.partialPivLu())>::PlainObject>() << "\n";
// Full Piv Householder QR: Eigen::Matrix<double, -1, -1>
std::cout << "Full Piv Householder QR: " <<
type_name<typename std::decay_t<decltype(A.fullPivHouseholderQr())>::PlainObject>() << "\n";
// This errors
std::cout << "Householder QR: " <<
type_name<typename std::decay_t<decltype(A.householderQr())>::PlainObject>() << "\n";
https://godbolt.org/z/avr7MrKr3
Is there a reason for that? Further, is there a reason the PlainObject is a Matrix? I understand that some of these are castable to matrices, but they are their own objects that hold more than a matrix does. Or is that not the idea behind PlainObject?
Environment
godbolt
Minimal Example
https://godbolt.org/z/avr7MrKr3
What is the current bug behavior?
Some decompositions have PlainObject while others do not. While we do our template metaprogramming over Eigen this has been a bit of an issue. If it's a feature then it would just be nice to know the intuition behind why some have PlainObject typedefs and others do not.
What is the expected correct behavior?
Personally I would expect the PlainObject of a decomposition to be itself. Though if I'm wrong here I'm fine with that.
Anything else that might help
-
Have a plan to fix this issue.
I have no plan in place for a fix as I'm unsure of the intended behavior.