Package minpq.moderator
Class ModeratorMultiTest
- java.lang.Object
-
- minpq.moderator.ModeratorMultiTest
-
class ModeratorMultiTest extends Object
Compare differentExtrinsicMinPQ
implementations to check that they compute the same values.
-
-
Constructor Summary
Constructors Constructor Description ModeratorMultiTest()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
addAllComments(Map<Double,String> toxic, ExtrinsicMinPQ<String> pq)
Add all comments and toxicities to the given priority queue.static void
main(String[] args)
private static boolean
sameRemoveOrder(ExtrinsicMinPQ<String> ref, ExtrinsicMinPQ<String> test)
Remove all elements fromref
andtest
and returns true if the order of removals are the same.
-
-
-
Field Detail
-
PATH
private static final String PATH
Path to the toxic content.- See Also:
- Constant Field Values
-
-
Method Detail
-
addAllComments
private static void addAllComments(Map<Double,String> toxic, ExtrinsicMinPQ<String> pq)
Add all comments and toxicities to the given priority queue.- Parameters:
toxic
-Map
of toxicity values to comments (since comments can share the same toxicity value).pq
- destination priority queue.
-
sameRemoveOrder
private static boolean sameRemoveOrder(ExtrinsicMinPQ<String> ref, ExtrinsicMinPQ<String> test)
Remove all elements fromref
andtest
and returns true if the order of removals are the same.- Parameters:
ref
- the reference priority queue.test
- the testing priority queue.- Returns:
- true if the order of removals are the same.
-
main
public static void main(String[] args) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-