@@ -27,8 +27,8 @@ describe('linear sum problem', () => {
2727 const { columnAssignments, rowAssignments } = linearSumAssignment ( diff , {
2828 maximaze : false ,
2929 } ) ;
30- expect ( columnAssignments ) . toMatchCloseTo ( [ 1 , 2 , 0 , 3 , 4 , - 1 ] ) ;
31- expect ( rowAssignments ) . toMatchCloseTo ( [ 2 , 0 , 1 , 3 , 4 ] ) ;
30+ expect ( columnAssignments ) . toMatchCloseTo ( [ 2 , 0 , 1 , 3 , 4 ] ) ;
31+ expect ( rowAssignments ) . toMatchCloseTo ( [ 1 , 2 , 0 , 3 , 4 , - 1 ] ) ;
3232 } ) ;
3333 it ( 'differents size: rows < columns' , ( ) => {
3434 const a = [ 3.1 , 1.1 , 1.9 , 3.99 , 5.2 ] ;
@@ -44,14 +44,14 @@ describe('linear sum problem', () => {
4444 } ) ;
4545 it ( 'before failing case' , ( ) => {
4646 const diff = [
47- [ 0.10000000000000009 , 0.5 , 0.6000000000000001 , 1.1 ] ,
48- [ 0.3999999999999999 , 0 , 0.10000000000000009 , 0.6000000000000001 ] ,
49- [ 0.8999999999999999 , 0.5 , 0.3999999999999999 , 0.10000000000000009 ] ,
47+ [ 0.010000000000000009 , 0.3999999999999999 , 0.5 , 1.0099999999999998 ] ,
48+ [ 0.49 , 0.10000000000000009 , 0 , 0.5099999999999998 ] ,
49+ [ 0.99 , 0.6000000000000001 , 0.5 , 0.009999999999999787 ] ,
5050 ] ;
5151 const { columnAssignments, rowAssignments } = linearSumAssignment ( diff , {
5252 maximaze : false ,
5353 } ) ;
54- expect ( columnAssignments ) . toMatchCloseTo ( [ 0 , 1 , 2 , - 1 ] ) ;
55- expect ( rowAssignments ) . toMatchCloseTo ( [ 0 , 1 , 2 ] ) ;
54+ expect ( columnAssignments ) . toMatchCloseTo ( [ 0 , - 1 , 1 , 2 ] ) ;
55+ expect ( rowAssignments ) . toMatchCloseTo ( [ 0 , 2 , 3 ] ) ;
5656 } ) ;
5757} ) ;
0 commit comments