MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / testSubSet

Method testSubSet

JSAT/test/jsat/utils/IntSortedSetTest.java:132–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131
132 @Test
133 public void testSubSet()
134 {
135 System.out.println("subset");
136
137 SortedSet<Integer> groundTruth = new TreeSet<Integer>();
138 IntSortedSet testSet = new IntSortedSet();
139
140 for (int i = 1; i < 20; i++)
141 for (int j = i * 20; j < (i + 1) * 20; j += i)
142 {
143 groundTruth.add(j);
144 testSet.add(j);
145 }
146
147 assertSameContent(groundTruth, testSet);
148
149 Random rand = RandomUtil.getRandom();
150
151 testHeadSet(groundTruth, testSet, rand, 3);
152 testTailSet(groundTruth, testSet, rand, 3);
153 testSubSet(groundTruth, testSet, rand, 3);
154 }
155
156 private void testHeadSet(SortedSet<Integer> groundTruth, SortedSet<Integer> testSet, Random rand, int depth)
157 {

Callers

nothing calls this directly

Calls 9

addMethod · 0.95
assertSameContentMethod · 0.95
getRandomMethod · 0.95
testHeadSetMethod · 0.95
testTailSetMethod · 0.95
addMethod · 0.45
lastMethod · 0.45
firstMethod · 0.45
subSetMethod · 0.45

Tested by

no test coverage detected