Re: [eigen] Eigen2 in Avogadro |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Eigen2 in Avogadro*From*: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>*Date*: Tue, 26 Aug 2008 12:34:38 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dDgxrEFxHskNOuE/doSs4w/GDcCBr9S/AEZdt4cqv50=; b=l62NhiTUmpGJH5nQzTWN0hPrEelVrV2KFgBc75SOnx6we8jmdwm8MP74tdCgdUfC+G w7p68WhFC2VZK11O9uXXg4h6zYM6JqoPkdtNuFV34hAplaio+yaVQHHHQGPUH01gqsfT ESvugxgHeCbL3VPWGUcb2TnmXfSPZSYtPnQC0=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hIimTdCANmSBa6QQqKFflBW8mlnczrc9yz4NitOyDBqMb/BOlfJoLizmkxhf0jzsj1 VQ5TB13A/saSDv4wa3Rehk+5nXIbPurkZMQdQaB85Mi1jqLBedy+n0a1l5p6TSATuf3g kRlnzZtWTtHphrFGY5D9n9AgCVU1Od/TC9Exc=

On Tue, Aug 26, 2008 at 11:35 AM, Daniel Gómez <dgomezferro@xxxxxxxxx> wrote: > On Monday 25 August 2008 21:38:23 jacob@xxxxxxxxxxxxxxx wrote: >> Quoting Gael Guennebaud <gael.guennebaud@xxxxxxxxx>: >> > good to know. Daniel (aka cylmor), are you still interested by hacking >> > the Sparse module ? this might gives you a hint on what to do first ! >> > actually our dense and sparse matrices already fulfill the storage >> > needs. Beyond polishing the Sparse API, what's really missing are the >> > high level solvers... >> >> Daniel: if you are interested then don't hesitate to contact the Step >> guy directly: ks vladimir at gmail. > > Sure, I'll contact him and see what I can do. I've already been looking at the > code and they seem to be using their own implementation of a Vector2d, that > is used even more than gmm stuff. May be you can have a look to see if it's > worth porting it to eigen2. Excellent ! Indeed they have their own vector class, seeing their API, the change would be trivial though. > They also use some wrapper classes around std::vector and plain C arrays > (gmm::array1D_reference for instance). Should these be made VectorXd ? if the purpose is to warp std::vectors, then I would say: Map<VectorXd>(&v[0], v.size()) >> About solvers, one quick solution is to borrow code from gmm and to >> ask permission to relicense from LGPL2 to our LGPL3+/GPL2+. I know the >> GMM maintainers are helpful. > > I'll try to implement them myself, if its too inefficient or too difficult > I'll contact GMM developers. that's up to you ! but I would advocate too to reuse their algorithms, at least for the first step... > I think what's left from eigen is to retrieve rows/columns from a sparse > matrix, but it doesn't look too difficult to do. yeah I think generic blocks are already supported, but indeed for sparse matrix it is worth it to have a dedicated implementation of row and col. There is also a more general issue I would like to point out: we have: MatrixBase <- SparseMatrixBase <- SparseMatrix <- HashMatrix <- etc... let's imagine we want to redefine .row(int) for SparseMatrix (or SparseMatrixBase), then what about: (1) (m1 + m2).row(i); though (m1 + m2) has the Sparse flag, .row(i) will use the generic default implementation. of course this example should be rewritten: (2) m1.row(i) + m2.row(i); ok, with sparse matrix, even if the proper .row(i) would be called, you should really write (2) instead of (1), but still, this is a general issue which probably does not hold for row/col only... FYI, for solveTriangular and Product I handled this problem with internal template specialization of ei_solveTriangular_impl and Product (and same for eval btw), maybe the same technique can be applied everywhere special code for sparse matrices is needed... Another related thing: I guess that several methods of MatrixBase does not hold for sparse matrices... then if the need appear, perhaps one option would be to simply have: SparseMatrixBase <- SparseMatrix <- HashMatrix <- etc... and copy from MatrixBase to SparseMatrixBase only the subset of the needed features... let's see.... > I hope you'll be around to answer questions, otherwise I'll be stuck > forever :P yes, sure no problem ! gael.

**Follow-Ups**:**Re: [eigen] Eigen2 in Avogadro***From:*jacob

**References**:**[eigen] Eigen2 in Avogadro***From:*jacob

**Re: [eigen] Eigen2 in Avogadro***From:*Gael Guennebaud

**Re: [eigen] Eigen2 in Avogadro***From:*jacob

**Re: [eigen] Eigen2 in Avogadro***From:*Daniel Gómez

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Eigen2 in Avogadro** - Next by Date:
**Re: [eigen] Eigen2 in Avogadro** - Previous by thread:
**Re: [eigen] Eigen2 in Avogadro** - Next by thread:
**Re: [eigen] Eigen2 in Avogadro**

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