bugGNU Octave - Bugs: bug #36439, Binary functions equivalent to...

 
 

bug #36439: Binary functions equivalent to infix operators not documented anywhere

Submitter:  Alexander Klein <matalex>
Submitted:  Wed 09 May 2012 08:10:04 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 28 Dec 2014 02:59:58 PM UTC, comment #4: 

Added extra documentation about the benefits of handles to operator functions in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/51a1d1164449).  Closing report.

Rik <rik5>
Group administrator
Fri 01 Jun 2012 03:08:24 PM UTC, comment #3: 

I just did some benchmarking which helps support the idea of better documentation.


Code      |  Time  |  Slowdown
-------------------------------
plus()    |  2.1   |     0%
@plus()   |  2.3   |    9.5%
@(x,y)x+y |  3.7   |    76%



Rik <rik5>
Group administrator
Fri 11 May 2012 11:14:15 AM UTC, comment #2: 

Yes, I think it would be very useful to cross-reference this list in the documentation of cellfun, maybe also in feval, and add a note to the section on anonymous functions stating that there is no need to write something like @(x,y)x+y when @plus will do as well, and especially faster, IIRC.

I'll try to write that up next week, too, and then submit an updated text along with what I'll write for boolean indexing.

Alexander Klein <matalex>
Wed 09 May 2012 01:29:42 PM UTC, comment #1: 

Is this the list you want?

http://www.gnu.org/software/octave/doc/interpreter/Operator-Overloading.html

Perhaps it should just be cross-referenced more.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 09 May 2012 08:10:04 AM UTC, original submission:  

The binary functions "plus", "minus", "times", "power", "eq", "ne", ”ge, "gt", "le", "lt", "or", "and", as well as "not" all don't seem to show up in the manual, at least with 3.6.1 they don't bring up anything useful as arguments for the doc command.

I think they should be mentioned at least in the operators section as well as in conjunction with cellfun and accumarray.

Are there any more functions like this? Once the list is complete I think I can write up the appropriate sections myself and submit them for inclusion in the manual.

Alexander Klein <matalex>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by matalex (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-28 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2013-07-29 mtmiller CategoryNone Documentation
        Release3.6.1 dev
    2012-05-09 jordigh StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code