InconsistencyParameterization extends ConsistencyParameterization { public static List<Treatment> standardizeCycle(List<Treatment> cycle) { assertCycle(cycle); List<Treatment> std = rebaseCycle(cycle); if (TreatmentComparator.INSTANCE.compare(std.get(1), std.get(std.size() - 2)) > 0) { Collections.reverse(std); } return std; } InconsistencyParameterization(Network network, Tree<Treatment, FoldedEdge<Treatment, Study>> tree, Map<Partition, Set<List<Treatment>>> cycleClasses, Map<Study, Treatment> baselines); static InconsistencyParameterization create(Network network); static Map<Partition, Set<List<Treatment>>> getCycleClasses(UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph, Tree<Treatment, FoldedEdge<Treatment, Study>> tree); static int getInconsistencyDegree(Map<Partition, Set<List<Treatment>>> cycleClasses); static boolean isInconsistencyCycle(Partition p); static Map<Study, Treatment> findStudyBaselines(Collection<Study> studies, UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph); static Map<Study, Treatment> findStudyBaselines(Collection<Study> studies, UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph, Map<Partition, Set<List<Treatment>>> cycleClasses); static Tree<Treatment, FoldedEdge<Treatment, Study>> findSpanningTree(Collection<Study> studies, UndirectedGraph<Treatment, FoldedEdge<Treatment, Study>> cGraph); static List<Treatment> standardizeCycle(List<Treatment> cycle); @Override List<NetworkParameter> getParameters();  }
@Test public void testStandardizeCycle() { List<Treatment> cycle = Arrays.asList(d_ta, d_tb, d_tc, d_ta); assertEquals(cycle, InconsistencyParameterization.standardizeCycle(cycle)); assertEquals(cycle, InconsistencyParameterization.standardizeCycle(Arrays.asList(d_tb, d_tc, d_ta, d_tb))); assertEquals(cycle, InconsistencyParameterization.standardizeCycle(Arrays.asList(d_ta, d_tc, d_tb, d_ta))); assertEquals(cycle, InconsistencyParameterization.standardizeCycle(Arrays.asList(d_tb, d_ta, d_tc, d_tb))); }