Re: [eigen] Indexes: why signed instead of unsigned? |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Indexes: why signed instead of unsigned?*From*: Andrea Arteaga <yo.eres@xxxxxxxxx>*Date*: Wed, 12 May 2010 11:17:21 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=+kTb44dmpkYPSeS9PI2ChtmqhZtAiDaXJHoFd3iJio8=; b=AYto/uLHGkvyAqhUWWE6N66BkG4LX1DMZ94HHwgV1T4V7QBf+FR8gKx75oG9WBtla+ lBofagbm7jx2ijlfEdv2Kbr4YjGUhJwdCHsgL+3gcbk8YvRIkQ7+8ncX8LOM1FalnL5V OOn3j2QLbLoVpQMS5OdXZHYUfmRBpg0DMaXgk=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=BqC6VhyvN19kv+9mTLdjVI0WXC0V/yZokgcCSTBCha8pa12/Q3c+mUzfq9NDoUxDj3 FHvvxPWqueZlYpwcY5pF85gGZAEivJhFOqh10gS/Q5Qytk2rXxcGGpY+9xGuGY3FWjeh 4bQGCY1vs+za66rhoiaHUb+pOwYNZdV9e2gjw=

Just a word from my recent experience about sparse matrices: I think it would be important to let the user decide the type of the indices. For dense matrices it doesn't matter if the indices are signed or unsigned, 32 or 64 bit, since the data structure does not contain data of this type (except for two numbers for rows and cols); but sparse matrices have one array for data, one for row indices and one for "column indices" (I'm talking about CRS storage), i.e. two arrays are involved in this decision.

I'm writing a library for interchanging data between C++ programs and Matlab, and I'm providing support for Eigen and Boost::ublas. This kind of problems are common in my work: having a template parameter to decide the type of the indices would be very useful.

Andrea Arteaga

**Follow-Ups**:**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**References**:**[eigen] Indexes: why signed instead of unsigned?***From:*Rui Maciel

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Mark Borgerding

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Rui Maciel

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Mark Borgerding

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Implementing a gpuBlock type** - Next by Date:
**Re: [eigen] Implementing a gpuBlock type** - Previous by thread:
**Re: [eigen] Indexes: why signed instead of unsigned?** - Next by thread:
**Re: [eigen] Indexes: why signed instead of unsigned?**

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