help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ranges?


From: Louis Pecora
Subject: Re: ranges?
Date: Wed, 23 Aug 2006 08:06:54 -0400
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

Dmitri A. Sergatskov wrote:
On 8/22/06, John W. Eaton <address@hidden> wrote:

Class must be double for compatibilty.  Internally, Octave still has a
special data type to represent ranges.  That's why you see only 24
bytes used in the first case.  Most (all?) arithmetic operations on
ranges result in matrices though, so that's why you see 80 bytes used
in the second case.  Adding optimized operations for ranges is
possible, but someone has to do the work.

I understand the conversion. I just was confused by apparent contradiction
between the Size and the Class for idx. Now I understand the reason.

See also the typeinfo function, which returns the name of the internal
data type instead of the Matlab-compatible class name.


Might this cause a problem when you have to do an operation on an index to determine a new index? Floating point truncation or rounding may convert back to the wrong (integer) index.


--
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]