TestUtils.assertEquals(correctRanks, ranks, 0d);
}
@Test
public void testNaNsFixedTiesRandom() {
RandomGenerator randomGenerator = new JDKRandomGenerator();
randomGenerator.setSeed(1000);
NaturalRanking ranking = new NaturalRanking(NaNStrategy.FIXED,
randomGenerator);
double[] ranks = ranking.rank(exampleData);
double[] correctRanks = { 5, 3, 6, 7, 3, 8, Double.NaN, 1, 2 };
TestUtils.assertEquals(correctRanks, ranks, 0d);