Package minpq.moderator
Class ModeratorMultiTest
- java.lang.Object
-
- minpq.moderator.ModeratorMultiTest
-
class ModeratorMultiTest extends Object
Compare differentExtrinsicMinPQimplementations 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 voidaddAllComments(Map<Double,String> toxic, ExtrinsicMinPQ<String> pq)Add all comments and toxicities to the given priority queue.static voidmain(String[] args)private static booleansameRemoveOrder(ExtrinsicMinPQ<String> ref, ExtrinsicMinPQ<String> test)Remove all elements fromrefandtestand 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-Mapof 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 fromrefandtestand 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:
IOExceptionInterruptedException
-
-