octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #36372] Improved ranks.m included:


From: Rik
Subject: [Octave-bug-tracker] [bug #36372] Improved ranks.m included:
Date: Tue, 4 Dec 2018 00:25:29 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063

Follow-up Comment #37, bug #36372 (project octave):

For point #1, Octave seems to be moving to mainting history and
meta-information within the Mercurial version control system rather than
within the files themselves.  So, we don't need explicit Author fields
anymore.

For point #3, the current code uses a case statement to decode either a string
or numeric argument at the same time.


switch (rtype)
  case {0, "fractional"};
    lin = (_competition (lin, sx, sz) + _modified (lin, sx, sz)) / 2;
  case {1, "competition"};
    lin = _competition (lin, sx, sz);
  case {2, "modified"};
    lin = _modified (lin, sx, sz);
  case {3, "ordinal"};
    ## no processing needed here.
  case {4, "dense"};
    lin = _dense (lin, sx, sz);
  otherwise
    if (! ischar (rtype))
      rtype = num2str (rtype);
    end
    error ("ranks: unknown RTYPE '%s'", rtype);
endswitch


Is there more input validation you were thinking of?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?36372>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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