Re: [eigen] array slicing/range

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


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.


> A
>
> On Fri, Feb 5, 2010 at 4:26 PM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
>> Seriously,
>>
>> 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.
>>>
>>> Cheers,
>>> Jinglei
>>>
>>>
>>>
>>
>>
>>
>> --
>> Rohit Garg
>>
>> http://rpg-314.blogspot.com/
>>
>> Senior Undergraduate
>> Department of Physics
>> Indian Institute of Technology
>> Bombay
>>
>>
>>
>
>
>



-- 
Rohit Garg

http://rpg-314.blogspot.com/

Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay



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