Re: [eigen] Areas of eigen3 variation and using eigen2/3 in generic code? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Areas of eigen3 variation and using eigen2/3 in generic code?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sun, 3 Jan 2010 12:03:43 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=xKITF83sxkaUnDJNpmFs4UrOwQmujrCWImbu78ihpEo=; b=LPnATQpGHyeHYtzaqWVeqOQStp95oedmm7iK1ddLMls0316lbggkwEhRSaTsc7VYd9 SaTRZAlnlsYBV/k8mipcL1bPKesMw8fWgQySWVQg4QrupU/4ZZiPX/NziSNqnLw8vt+2 d3ECtyMElBlTDx5Z+9PAxePV2tr+YWVhOum48=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ZD6F0cdM1Mk2rrT1VPadUT40WVojR381HKpVlA3pyE6JWCfh9j+Bo+6WOHVK95rOTl kPs0A9sLZTauu2Go9ZI5EJMZTw9avHiwmRpCLRy01dgDmf2uDAuJ7yL/R2px2gai6KPK YoLmHxN1GQ9dWiIWeJmQy/TxGWJaMKqs8EZR8=
2010/1/3 Jesse Perla <jesseperla@xxxxxxxxx>:
> I am considering a partial switch for my economics-oriented library from
> ublas to eigen and have a few questions.
> 1. What are the likely areas of flux in the eigen3 interface? I looked
> at: http://eigen.tuxfamily.org/index.php?title=Todo_for_3.0 and it seems
> that most are focused on changing higher level functionality and some of the
> underlying expression template tech. But not necessarily on the basic
> linear algebra operations . Is this correct?
Yes, correct.
> My worry, of course, is to
> have to do a port of my library to eigen3 in 9-12 months that involves
> fundamental changes. If I stuck to the basic operations
> in: http://eigen.tuxfamily.org/dox-devel/AsciiQuickReference.txt ;(with the
> exception of the solution and eigenvalue routines) do you expect that I
> would have few changes when it comes time for a port?
Yes, there would be few changes.
The basic linear algebra operations syntax doesn't change. The thing
closest to this that will change, is coefficient-wise operations with
cwise().
> 2. I am interested in writing many of my library routines with generic code
> that would use a subset of operations and could work with various
> matrix/vector types. (just the basic opertations for the most part, with no
> expectation of integration between libraries for a given call)
> Since many of the other libraries use free rather than member functions, it
> would make things easier if those functions existed (e.g. row(A, i) as well
> as A.row(i) ). Is this something people have contributed or is there
> anything that could make this difficult to develop with no overhead? If
> there is no impediment, it is something I could contribute on my own using
> basic SFINAE if it is allowed in the library. I think a lot of people would
> find this a natural alternative API.
We don't have this at the moment, but nothing prevents you from
writing your own, there is no difficulty here.
Just look at the file MatrixBase.h where all these methods are
declared, it is then straightforward to write inline global functions
wrapping them.
We do not have plans to include this in Eigen itself; not that it
would cost anything besides maintainance, but I don't think there's a
single API to implement that would satisfy everybody, so I would
rather expect that people who need it code their own; but nothing
prevents you from creating your Eigen fork on bitbucket.org and
creating a new unsupported module there, and then we'll see how many
people find it useful.
> 3. I am interested in writing a lot of routines that would have the option
> of using the boost numeric bindings traits
> (see https://svn.boost.org/svn/boost/sandbox/numeric_bindings/boost/numeric/bindings/traits/ and http://lists.boost.org/MailArchives/ublas/2009/11/3854.php ;).
> Mostly, this involves creating a set of traits classes that enable
> interoperability with bound LAPACK, MUMPS, etc. routines and partially
> solves the problem described in (2.).
> Has anyone implemented the traits for eigen2 or see any reason it would be
> impossible?
I haven't heard of that, but at first glance, this seems perfectly possible..
Cheers,
Benoit