Skip to content

Commit

Permalink
trying test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdfekete committed Aug 6, 2015
1 parent 4f7b45c commit 1867e36
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/ca-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ suite.addBatch({
assert.inDeltaArray(col_order,
[0.008648877634363464,0.003012341005018805,-0.004699577426261494,-0.0042389549655066465],
0.001);
},
"harder": function() {
var mat = [
[1, 0, 0, 1, 0],
[0, 1, 1, 0, 1],
[1, 0, 0, 1, 0],
[1, 1, 0, 0, 0],
[0, 1, 1, 0, 1]
],
res = reorder.ca(mat),
col_order = reorder.sort_order(res[0]),
row_order = reorder.sort_order(res[1]);
console.log('col_order: '+col_order);
console.log('row_order: '+row_order);
reorder.printmat(mat);
mat=reorder.permute(mat, col_order);
mat=reorder.permutetranspose(mat, row_order);
reorder.printmat(mat);
}
}
});
Expand Down

0 comments on commit 1867e36

Please sign in to comment.