Huffman coding comparison

Simen kjaeraas simen.kjaras at gmail.com
Sun May 30 10:29:48 PDT 2010


Philippe Sigaud <philippe.sigaud at gmail.com> wrote:
> Simen, could you please have a look at my dranges project?
>
> http://www.dsource.org/projects/dranges/
>
> Look at the algorithm and range sections, you'll find plenty of code that
> try to tackle this.
> In particular combinations() in algorithm2, and also tensorialProduct()  
> in
> rangeofranges
>
> combinations is a higher-order range that takes any number of forward  
> ranges
> and output their combinations as tuples.
>
> tensorialProduct does the same, but creates 'topology' : the combination  
> of
> three ranges is a range, whereas the tensorial product of three (linear)
> ranges is a range of ranges of ranges:
>
> tensorialProduct([0,1],[2,3])
> ->
> [[(0,2),(0,3)],
>  [(1,2),(1,3)]]
>
> (where (x,y) indicates a tuple)

Indeed. I just had a quick look at the traits2 module last time you
linked it. This does seem to cover all bases. I have to say I'm impressed!


-- 
Simen


More information about the Digitalmars-d mailing list