@@ -261,7 +261,7 @@ public void testBackward(final TestHMM model, final List<TestHMM.Datum> sequence
261
261
for (int position = positions .size () - 1 ; position >= 0 ; position --) {
262
262
for (final TestHMM .State state : TestHMM .State .values ()) {
263
263
final double expectedValue = expected .get (position )[state .ordinal ()];
264
- final double observedValue = forwardBackwardResult .logBackwardProbability (new Integer (position ), state );
264
+ final double observedValue = forwardBackwardResult .logBackwardProbability (Integer . valueOf (position ), state );
265
265
final double observedValueUsingIndex = forwardBackwardResult .logBackwardProbability (position , state );
266
266
Assert .assertEquals (observedValueUsingIndex , observedValue );
267
267
final double epsilon = 0.001 * Math .min (Math .abs (expectedValue ),
@@ -500,7 +500,7 @@ public void testLogProbabilityWithNullStateUsingPositionObject() {
500
500
501
501
}
502
502
Assert .assertNotNull (result );
503
- result .logProbability (new Integer (2 ), (TestHMM .State )null );
503
+ result .logProbability (Integer . valueOf (2 ), (TestHMM .State )null );
504
504
}
505
505
506
506
@@ -529,7 +529,7 @@ public void testLogDataLikelihoodWithWrongTargetUsingPositionObject() {
529
529
Assert .fail ("this part of the test must not fail" );
530
530
531
531
}
532
- result .logDataLikelihood (new Integer (14 ));
532
+ result .logDataLikelihood (Integer . valueOf (14 ));
533
533
}
534
534
535
535
@ Test (expectedExceptions = IllegalArgumentException .class )
@@ -559,7 +559,7 @@ public void testLogBackProbabilityWithNullStateUsingPositionObject() {
559
559
560
560
}
561
561
Assert .assertNotNull (result );
562
- result .logBackwardProbability (new Integer (2 ), null );
562
+ result .logBackwardProbability (Integer . valueOf (2 ), null );
563
563
}
564
564
565
565
@ Test (expectedExceptions = IllegalArgumentException .class )
@@ -589,7 +589,7 @@ public void testLogForwardProbabilityWithNullStateUsingPositionObject() {
589
589
590
590
}
591
591
Assert .assertNotNull (result );
592
- result .logForwardProbability (new Integer (2 ), null );
592
+ result .logForwardProbability (Integer . valueOf (2 ), null );
593
593
}
594
594
595
595
@ Test (expectedExceptions = IllegalArgumentException .class )
@@ -649,7 +649,7 @@ public void testLogProbabilityWithMadeUpPositionObject() {
649
649
650
650
}
651
651
Assert .assertNotNull (result );
652
- result .logProbability (new Integer (14 ), TestHMM .State .A );
652
+ result .logProbability (Integer . valueOf (14 ), TestHMM .State .A );
653
653
}
654
654
655
655
@ Test (expectedExceptions = IllegalArgumentException .class )
@@ -679,7 +679,7 @@ public void testLogProbabilityWithASequenceThatIsTwoLongUsingPositionObject() {
679
679
680
680
}
681
681
Assert .assertNotNull (result );
682
- result .logProbability (new Integer (2 ), Arrays .asList (TestHMM .State .A , TestHMM .State .A , TestHMM .State .B ));
682
+ result .logProbability (Integer . valueOf (2 ), Arrays .asList (TestHMM .State .A , TestHMM .State .A , TestHMM .State .B ));
683
683
}
684
684
685
685
@ Test (expectedExceptions = IllegalArgumentException .class )
@@ -769,7 +769,7 @@ public void testLogProbabilityWithNonExistentPositionObject() {
769
769
770
770
}
771
771
Assert .assertNotNull (result );
772
- result .logProbability (new Integer (4 ), TestHMM .State .A );
772
+ result .logProbability (Integer . valueOf (4 ), TestHMM .State .A );
773
773
}
774
774
775
775
@ Test (expectedExceptions = IllegalArgumentException .class )
0 commit comments