jeanluct / braidlab

Matlab package for analyzing data using braids
GNU General Public License v3.0
23 stars 9 forks source link

databraid.compact is broken #95

Closed jeanluct closed 9 years ago

jeanluct commented 9 years ago

At some point making a set method for braid broke the compact function for databraid, since we are setting generators to zero:

>> b=databraid([1 2 -2 3],[1 2 3 4])

b = 

 < 1  2 -2  3 >

>> compact(b)
Error using braidlab.braid/set.word (line 269)
Generators cannot be zero.

Error in braidlab.databraid/compact/canceladj (line 242)
        cc.word(i2(ic)) = 0; cc.word(i2(ic)+1) = 0;

Error in braidlab.databraid/compact (line 252)
        [c,shorter] = canceladj(c);

(We need more unit tests for databraids! Maybe open another issue.)