mapper functions for 3.1
David Bateman
adb014 at gmail.com
Sat Feb 9 18:04:04 CST 2008
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.
More information about the Octave-maintainers
mailing list