| [eigen] Using LU with matrix-views and blocks | 
[ Thread Index | 
Date Index
| More lists.tuxfamily.org/eigen Archives
] 
- To: eigen@xxxxxxxxxxxxxxxxxxx
 
- Subject: [eigen] Using LU with matrix-views and blocks
 
- From: Manoj Rajagopalan <rmanoj@xxxxxxxxx>
 
- Date: Sun, 11 Apr 2010 23:37:04 -0400
 
- Organization: EECS Dept., University of Michigan, Ann Arbor, MI, USA
 
Hi eigen-users,
   I have a requirement for performing A \ b where A is a submatrix of a 
larger matrix, created using MatrixXd::block(...). I can use A.lu().solve() 
but can't seem to be able to use FullPivLu<Block<MatrixXd> > to store the LU 
factorization of A and then use it repeatedly. Is this be design?
  I also don't seem to be able to store the LU factorization when I create a 
matrix view using Map<MatrixXd>.
    Have these features been suggested for implementation? Can they be 
considered for inclusion?
   I am writing code that needs to be high-performance so I conservatively 
pre-allocate my matrices in a constructor and later use submatrix portions 
later (whose dimensions show bounded change with each iteration). 
Alternatively, I conservatively pre-allocate a large std::vector<double> in 
my CTOR and try to use Map<MatrixXd> with the correct dynamic size. In either 
case, I need to use the LU.
   Problems mostly seem to be venial compilation issues:
1. missing enums
2. missing default CTORs for Block and Map (probably by design)
3. DenseStorageBase::_check_template_params() failure because correcting
    issue #1 above with missing enum defs fails static assert (probably
    because I don't understand Eigen well enough yet to assign correct
    values).
  Any ideas/tips?
Thanks,
Manoj