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

The order of operator may not be consistent between eigSolver and flda. #9

Open
nennigb opened this issue Oct 30, 2020 · 0 comments
Open

Comments

@nennigb
Copy link
Owner

nennigb commented Oct 30, 2020

In eigSolver.py, the matrices are passed to eigenvalue solvers depending on their position in the K list. This assume that operators are well ordered in K, dK and in flda. A more robust approach could be to use flda to sort and to pass the matrices to solvers.

The modification will concern all solve methods of EigSolver concrete class. For instance

        # FIXME need to modify matrix order based on flda
        if self.pb_type=='std':
            self.Lda,Vec = sp.linalg.eig(self.K[0],b=None) 
        elif self.pb_type=='gen':            
            self.Lda,Vec = sp.linalg.eig(self.K[0],b=-self.K[1])
        elif self.pb_type=='PEP':
            self.Lda,Vec = self._pep(self.K)
        else:
            raise NotImplementedError('The pb_type {} is not yet implemented'.format(self.pb_type))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant