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

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

[Octave-patch-tracker] [patch #8379] signal package: Implemented uencode


From: Mike Miller
Subject: [Octave-patch-tracker] [patch #8379] signal package: Implemented uencode function
Date: Fri, 07 Mar 2014 06:39:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.123 Safari/537.36

Follow-up Comment #4, patch #8379 (project octave):

Great work, you are definitely picking up the coding style and generating a
proper mercurial changeset here.

A couple more nits to pick on this latest patch.

* We try to differentiate between indexing (no space between variable and
parenthesis) and function calls (with space).
* If args must be integer-valued, then test for that, something like "n < 2 ||
n > 32 || n != fix (n)".
* Use ^ instead of double-asterisk for exponentiation, both do work but for
consistency it's better to stick to one operator.
* Instead of "(in < 0) == zeros (size (in))", something like "all (in >= 0)"
should be more efficient.
* Instead of "logical ((in > -v) .* (in < v))", try "((in > -v) & (in < v))".
Also when you're going to use the same such complex indexing more than once,
you can use a temporary logical index array, something like


idx = (in > -v) & (in < v);
a(idx) = somefunc (a(idx));


I hope you can see I'm just focusing on little details now, overall this is a
really good patch and I could definitely apply it to the signal repository as
it is with only minor cleanup. I saw you're applying for GSoC so this seems
like a good opportunity to absorb some of the common patterns and styles we
use across the Octave code base.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8379>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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