help-octave
[Top][All Lists]
Advanced

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

Re: Difference between NaN and NA?


From: Jaroslav Hajek
Subject: Re: Difference between NaN and NA?
Date: Thu, 8 Apr 2010 13:50:54 +0200

On Thu, Apr 8, 2010 at 1:45 PM, John W. Eaton <address@hidden> wrote:
> On  8-Apr-2010, Jaroslav Hajek wrote:
>
> | But why make it built-in? I think that even with the current limited
> | OOP capabilities, it is possible to build a class that maintains the
> | NA's as a separate mask, making even the elementary operations
> | NA-aware (i.e. so that x + NA is NA and never NaN). Overloading the
> | statistics functions like mean etc. would also be quite simple.
>
> But don't you then have to overload pretty much every function to
> ensure that NA is handled correctly in all instances?  I guess it's
> just a SMOP.
>

Why every? I would say just make the class and overload the basic ops
and basic statistics methods (mean, std, etc), and let others do the
rest if they need it. Some m-functions may happen to "just work", if
they use the right building blocks.
We're not MathWorks delivering a paid product, we're a community.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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