|Re: [eigen] array slicing/range|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] array slicing/range
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Fri, 5 Feb 2010 19:41:28 +0530
- 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 :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=/2DGVouYXad68EIOa8VEUSR7qhYLBFkEaVzvH93IrZU=; b=UBBoKuZmbdoqvjDHtxMQ++Ddx0RmqvQVJ3Dz2NzAT/8tywMBefjP1w3mwZaubIMg8e +hFTLmTsfgx6Xaj8cm6GgTQIJl7xazV91C2HafDyoI0cII34VO/t0tIsyZhibCC2Og6C 3kK18MuxZuDsNQeT6Cv4Rwu6X6AXL/0/Aoa3Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=vgvio7NFrj4pZIGXCu6bKJF93Jg753x3VUFhty4wPTh7kJ6GGlIrYXNJjppps3fCe1 YFEzHLo1BC4LojEWqgH8doqLbuDyuxJJD5cvCQJ7d6tUeDbZs8wwrrV2r8riTOwN5fBd oxpJuEXhtSesFg6eqnwABd3F1BDerYw5+wpw4=
On Fri, Feb 5, 2010 at 7:02 PM, Aron Ahmadia <aja2111@xxxxxxxxxxxx> wrote:
> The Fortran/MATLAB syntax has the advantage of being incredibly terse.
> I come from a MATLAB background, and I strongly appreciate the way
> linear algebra routines look in MATLAB/Fortran as opposed to other
> languages. It would be fun to come up with a preprocessor that does
> what Jinglei is asking, but I don't think any of us have that kind of
> time :)
Fair enough. However, my point is that the difference between
array.segment(i, j) and array(i:j) is small enough to not warrant
that kind of investment of time and effort.
Not to mention that such a preprocessor hack, if done, is a de facto
fork of the _language_ . And my philosophy is that tools should always
be good citizens of native environment. One of my pet peeves against
Qt. Although it is a fine toolkit otherwise.
> On Fri, Feb 5, 2010 at 4:26 PM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
>> why do you want to hack the fortran syntax into eigen? What's the upside?
>> On Fri, Feb 5, 2010 at 4:23 PM, Jinglei Hu <jingleihu@xxxxxxxxx> wrote:
>>> Hi guys,
>>> I knew from the Eigen developer that one can use array.segment(i, j) to get
>>> slice of an array. I'm wondering if it's possible to use array(i:j) to get
>>> slice just like Fortran.
>> Rohit Garg
>> Senior Undergraduate
>> Department of Physics
>> Indian Institute of Technology
Department of Physics
Indian Institute of Technology