[eigen] GSoC 2018 Symmetric Matrix

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

Hello there,

first of all: thank you for Eigen. I’m using a lot of products that relay on it and its high performance. Since this is my first interaction with the Eigen mailing list, I want to introduce myself. My name is David Tellenbach and I currently studying Computer Science at the LMU in Munich, Germany.

I am currently working on the Google Summer of Code 2018 project Faster Matrix Algebra for ATLAS. As you might know there has been an evaluation test for the project which I successfully participated in. The task is to create a class for handling symmetric matrices as an extension for Eigen. One of the main goals is to store only one triangular part (upper or lower) of the matrix.

I already have some concrete ideas for implementing such a class and would like to discuss them with you. The project mentors encouraged me to do so. 

Please correct me when I’m wrong but as far as I see, Eigen basically provides three types of matrices: Dense, sparse and diagonal matrices. Of these types, the class Eigen::DiagonalMatrix seems to be the one that could be most similar to a possible implementation of a class for symmetric matrices. There is no need for storing all elements (as in the case of dense matrices) neither is a sophisticated mechanism to find the position of scalars in the matrix needed (as in the case of sparse matrices). Therefore I’d like to create the for symmetric matrices by deriving from Eigen::EigenBase (as in the case of diagonal matrices). 

I would like to provide the overloaded operator + and - by directly adding (or subtracting) the underlying container. Since the multiplication of symmetric matrices is in general not symmetric I would handle multiplication by using the multiplication of Eigen::Matrix which I would construct from the underlying container of the symmetric matrix. In terms of performance it might be better to not construct instances of Eigen::Matrix but instances of Eigen::SelfAdjointView and multiply these.

What do you think of these ideas?

While going through some of the Eigen headers some questions came up:

1. Why are no operators for addition, subtraction or multiplication for two instances of Eigen::DiagonalMatrix available?
2. Why is it not possible to multiply two instances of Eigen::SelfAdjointView<Eigen::Matrix<…>> but if one of the operands is of type Eigen::Matrix everything works. 

Thank you for your help! 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/