Implement triangular matrix storage support
Description
Propose the addition of triangular storage type support within the Eigen library.
Many commonly used special matrices, such as Symmetric and Hermitian matrices, exhibit a specific structural property: they can be effectively stored with only their upper or lower triangular components. This storage approach results in a notable memory reduction. In my field, this memory-efficient representation is commonly employed. And I have made a basic implementation for my personal project to use external libraries.
Feature Importance
The introduction of native support for triangular storage types in Eigen would be invaluable for optimizing memory consumption in scenarios where these specialized matrices are prevalent.
Implementation
The implementation of this feature should be relatively straightforward, primarily involving the integration of triangular storage strategies into the existing Eigen framework. A proxy object type can also be easily implemented to enable user to get and set every matrix element like a regular dense matrix. For those interested in exploring this feature, I'm happy to provide my implementation as a point of reference.