Examples of PTASequenceSet


Examples of statechum.model.testset.PTASequenceSet

   * generating walks.
   */
  protected void initAllSequences()
  {
    tag = new StateName(0,false);
    allSequences = new PTASequenceSet(new PercentLabelledPTA());extraSequences = new PTASequenceSet(new PercentLabelledPTA());
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

   * generating walks.
   */
  protected void initAllSequences()
  {
    tag = new StateName(0,false);
    allSequences = new PTASequenceSet(new PercentLabelledPTA());extraSequences = new PTASequenceSet(new PercentLabelledPTA());
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

    //l.setCertaintyThreshold(5);
    testConfig.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);
    LearnerGraph learntStructureA = new LearnerGraph(l.learnMachine(buildSet(plus), buildSet(minus)),expected.config);

    // Now do the same with ptasets instead of real sets
    PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(buildSet(plus));PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(buildSet(minus));
    LearnerGraph learntStructureB = new LearnerGraph(l.learnMachine(plusPTA, minusPTA),expected.config);
    //Visualiser.updateFrame(learntStructureA, expected);
    Assert.assertNull(WMethod.checkM(learntStructureA, learntStructureB));
    LearnerGraph learntMachineNoRejects = new LearnerGraph(expected.config);
    AbstractPathRoutines.removeRejectStates(learntStructureA,learntMachineNoRejects);
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection7a()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
    },config),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(1, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection7b()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
    },config),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(1, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection8()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addSequence(new LinkedList<Label>());
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{}));
    c.addSequence(labelList(new String[]{"a","b"}));
    c.addSequence(labelList(new String[]{"a","c","d"}));
    c.addSequence(labelList(new String[]{"a"}));
    c.addSequence(labelList(new String[]{"a"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection9()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"},
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config),actual = new HashSet<List<Label>>();actual.addAll(c.getData());
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection10()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"}},config));
   
    PTASequenceSet d = new PTASequenceSet();
    d.addAll(buildSet(new String[][] {   
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config));
    c.addAll(d);
    Set<List<Label>> expected = buildSet(new String[][]{
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  }
 
  @Test
  public final void testPrefixRemovingCollection11()
  {
    PTASequenceSet c = new PTASequenceSet();
    c.addAll(buildSet(new String[][] {
      new String[]{"a"},
      new String[]{},
      new String[]{"a","b"},
      new String[]{"a","c","d"},
      new String[]{"a"},
      new String[]{"a"}},config));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"a","b"},
        new String[]{"a","c","d"}
    },config),actual = new HashSet<List<Label>>();actual.addAll(c);
    Assert.assertEquals(2, c.getData().size());
    Assert.assertTrue(expected.equals(actual));
    Assert.assertFalse(c.getData().isEmpty());

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertTrue(c.contains(labelList(new String[]{"a"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","b"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c"})));
    Assert.assertTrue(c.contains(labelList(new String[]{"a","c","d"})));
    Assert.assertFalse(c.contains(labelList(new String[]{"a","b","a"})));
   
    Assert.assertTrue(c.containsAll(expected));
    Assert.assertTrue(c.containsAll(c));
  }
View Full Code Here

Examples of statechum.model.testset.PTASequenceSet

  final Configuration config = Configuration.getDefaultConfiguration();
 
  @Test
  public final void testPrefixRemovingCollection0()
  {
    PTASequenceSet c = new PTASequenceSet();
    Assert.assertEquals(0, c.size());
    Assert.assertFalse(c.getData().iterator().hasNext());
    Assert.assertTrue(c.getData().isEmpty());

    Assert.assertTrue(c.containsAll(c));

    Assert.assertTrue(c.contains(new LinkedList<Label>()));
    Assert.assertFalse(c.contains(labelList(new String[]{"a"})));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.