/* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof LearnerEvaluationConfiguration)) return false; final LearnerEvaluationConfiguration other = (LearnerEvaluationConfiguration) obj; assert config != null && other.config != null; if (!config.equals(other.config)) return false; assert graph != null && other.graph != null; if (graph == null) { if (other.graph != null) return false; } else if (!graph.equals(other.graph)) return false; if (ifthenSequences == null) { if (other.ifthenSequences != null) return false; } else if (!ifthenSequences.equals(other.ifthenSequences)) return false; if (testSet == null) { if (other.testSet != null) return false; } else if (!testSet.equals(other.testSet)) return false; if (labelDetails == null) { if (other.labelDetails != null) return false; } else if (!labelDetails.equals(other.labelDetails)) return false; return true; }
/** Tests that updating a maximal automata can chop off parts of a tree. */ @Test public void testPTAconstruction_max5() { Configuration config = mainConfiguration; Set<List<Label>> minusStrings = buildSet(new String[][] {new String[] {}}, config, converter); LearnerGraph graph = buildLearnerGraph( "A-a->B-b->C-c->A\nA-b->C-d->C", "initial_max", mainConfiguration.copy(), converter); graph.findVertex(VertexID.parseID("A")).setDepth(0); graph.config.setLearnerIdMode(Configuration.IDMode.POSITIVE_NEGATIVE); graph.paths.augmentPTA(minusStrings, false, true); final LearnerGraph expected = new LearnerGraph(mainConfiguration.copy()); expected.getVertex(new LinkedList<Label>()).setAccept(false); DifferentFSMException result = WMethod.checkM(expected, graph); Assert.assertNull(result); checkDepthLabelling(graph); }
/* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((config == null) ? 0 : config.hashCode()); result = prime * result + ((graph == null) ? 0 : graph.hashCode()); result = prime * result + ((ifthenSequences == null) ? 0 : ifthenSequences.hashCode()); result = prime * result + ((testSet == null) ? 0 : testSet.hashCode()); result = prime * result + ((labelDetails == null) ? 0 : labelDetails.hashCode()); return result; }