Re: [eigen] documentation |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] documentation*From*: Mathieu Dutour <mathieu.dutour@xxxxxxxxx>*Date*: Sat, 22 Nov 2014 09:26:45 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=H4W2R9xsx8uyFSv7BF+86Acd/6CA+aMKFdMDSMQtSKQ=; b=CAqSkJo3QzEvetJYSQQ0VCDCS9JxzjgDxFdMCoTxEHCkJWSqgqF0C7VONzjiaFWUv0 fJxeHVbs+u9GKNeI9yaDa1UcWKC+rirJjEMpD6mKnFAovHqelRUZPBR8/uEUgqXa5+Qo ta3jzzkBh7MS262JtJTvNNJRfJHGhOFkIQNLsfje75Zi888dkGOXcR/Fsj0xO8zQImnC JYcUqLPk4hexFdum/g+4DthZJR2jzloJqYRceSErMOr2w4bDsvQ2KE76+4uLM+VDlaKM eSoXyozzYxH6NpzY8IGlUMTi/rueHJ91zCj6tNsBX17eOTOu4qljICjwHiHbWdfO0Zh1 gTPg==

Ok, so then let me ask you the questions directly.

I want to use eigen for containing matrices or arbitrary size

with coefficients in a template class which could be

a) float point like "float", "double" but also higher precision like

"quadmath" or "mpreal"

b) or a number type arithmetic like "mpq_class", "flintxx" or "int"

or some number field types.

I already have my own type with

template<typename T>

struct MyMatrix

{

public:

.

.

.

private:

int nbRow;

int nbCol;

T *ListElt;

};

but it depends on copy operators all around (though I should be

able to use the move semantic). So I was wondering if I could

use eigen as a more advanced matrix operation container.

I have no problem using eigen in a single routine and computing

inverse, which are actually of better quality than the one I computed

with my own stupid Gauss elimination code. However, I have

problems with the copy operators and how to acess to the class

capabilities.

Q1: How to write a function that returns a matrix?

the following code does not compile:

Eigen::Matrix<double> HilbertMatrix(int const& n)

{

Eigen::Matrix<double,Dynamic,Dynamic> eMat(n, n);

for (int i=0; i<n; i++)

for (int j=0; j<n; j++)

eMat[i][j]=double(1)/(double(i+j+1));

return eMat;

}

Q2: What is the list of individual operations? I imagine

inverses function should be different between a floating

point type and an exact number theoretic type. How can

I acces exact inverse functions?

Q3: For the number theoretic operations, the technique

is to do Gauss rows and columns operations. I understand

Gauss elimination is out of consideration for floating

point operations. But for number theory this is what is

needed. Can we have access to operation like

Ci <----- >Ci - a Cj ?

Q4: I sometimes need higher dimensional containers.

I wrote one inspired by "MyMatrix". Is there something

similar in Eigen? I guess no, just asking.

Q5: There are many examples of use eigen in the code

but they are all more or less of the same kind.

a) Could we get examples that use template parameters?

double and float are fine but that is not what all there is

b) Could we get examples with variable matrix size?

c) Could we get use of copy constructors and assignment

operators?

Thank you very much in advance.

Best,

Mathieu

On Tue, Nov 18, 2014 at 9:53 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

This looks like a doxygen bug, and we are not the first to encounter this issue: https://gitorious.org/vc/vc/commit/af9e700660a6d5c36b2593d3fccd34c8be90f7f0gaelOn Tue, Nov 18, 2014 at 5:59 PM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:On 16.11.2014 18:39, Mathieu Dutour wrote:

For example the following two lines are problematic:

\input{namespaces}

\input{hierarchy}

because the corresponding .tex file does not exist.

I currently don't have the time to look into that problem. Could you add a bugzilla entry for that? (Also mention in that entry that GENERATE_LATEX shall be enabled/enable-able)

If you are able to fix the problem, a patch would be welcome, of course.

Christoph

--

----------------------------------------------

Dipl.-Inf., Dipl.-Math. Christoph Hertzberg

Cartesium 0.049

Universität Bremen

Enrique-Schmidt-Straße 5

28359 Bremen

Tel: +49 (421) 218-64252

----------------------------------------------

**Follow-Ups**:**Re: [eigen] documentation***From:*Christoph Hertzberg

**References**:**Re: [eigen] documentation***From:*Mathieu Dutour

**Re: [eigen] documentation***From:*Christoph Hertzberg

**Re: [eigen] documentation***From:*Gael Guennebaud

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

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