octave-maintainers
[Top][All Lists]
Advanced

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

Re: mapper functions for 3.1


From: David Bateman
Subject: Re: mapper functions for 3.1
Date: Sun, 10 Feb 2008 01:04:04 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20070914)

Ok, first hitch. As an example std::sin can accept both double and
Complex arguments. Therefore in you example

>  DEFUN (sin, args, , "...")
>   {
>     octave_value retval;
>     if (args.length () == 1)
>       retval = args(0).map (std::sin);
>     else
>       print_usage ();
>
>     return retval;
>   }
>

how is the map method supposed to know which version of the sin function
we are referring to? The current implemented gets around this by storing
a version of both and then picking the appropriate version when the
apply method is called?

D.


reply via email to

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