On 6 December 2011 23:23, Ferran Mesas <ferran.mesa...@gmail.com> wrote:
> Hello Carnë,
>
> Yes, i think it can be made a subfunction. The thing is, the dictionary from
> huffmandict() is very efficient for encoding and memory-wise, but the
> array-tree is good at decoding but not memory-efficient.
> Embedding dict2tree into huffmandeco seems like a good idea.
>
> I copied the license-help and input validation from the "old" huffmandeco
> because I wasn't aware newer functions use GPLv3+, but you can change it if
> you want, no problem. Same for error-checking, print_usage() makes more
> sense.
>
> I made the following changes:
> - Made dict2tree into a subfunction.
> - Changed license text to v3+.
> - Made invalid input print the function usage.
>
> Let me know if anything else should be changed.

If the first argument hcode, is supposed to be only binary, shouldn't
we check instead if it's a logical matrix? "islogical (hcode)". Also,
your current check would allow for values between 0 and 1. If you want
to allow a matrix of doubles of 0 and 1, should we check any (hcode(:)
!= 0) || any (hcode(:) != 1) (not tested).

Carnë

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to