Examples of crossWithSequence()


Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  @Test
  public final void test_sequenceSet5_2() // a more complex composition
  {
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    seq.crossWithSequence(Arrays.asList(new String[] {"a","b","c"})).crossWithSet(new LinkedList<String>());
    Map<String,String> actual = getDebugDataMap(en,en.new SequenceSet().cross(TestFSMAlgo.buildList(new String[][] {// here the new sequenceSet is empty, hence whatever I do, there should be no changes
        new String[] {"a","b","c","d"},
        new String[] {"c"}
    })));
    vertifyPTA(en, 1, new String[][] {
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

    SequenceSet seqStart1 = en.new SequenceSet();
    SequenceSet seqStart2 = seqStart1.crossWithSequence(Arrays.asList(
        new String[] {"a"}
    ));
    SequenceSet seqDifferent1 = en.new SequenceSet();seqDifferent1.setIdentity();
    SequenceSet seqDifferent2 = en.new SequenceSet();seqDifferent2.setIdentity();seqDifferent2.crossWithSequence(Arrays.asList(
        new String[] {"a"}
    ));
    equalityTestingHelper(seqStart1,seqStart2,seqDifferent1,seqDifferent2);
  }
 
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  public final void test_sequenceSet_equality0b()
  {
    SequenceSet seqStart1 = en.new SequenceSet();
    SequenceSet seqStart2 = en.new SequenceSet();
    SequenceSet seqDifferent1 = en.new SequenceSet();seqDifferent1.setIdentity();
    SequenceSet seqDifferent2 = en.new SequenceSet();seqDifferent2.setIdentity();seqDifferent2.crossWithSequence(Arrays.asList(
        new String[] {"a"}
    ));
    equalityTestingHelper(seqStart1,seqStart2,seqDifferent1,seqDifferent2);
  }
 
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

 
  /** Test for equality of different sequenceSets. */
  @Test
  public final void test_sequenceSet_equality0c()
  {
    SequenceSet seqStart1 = en.new SequenceSet();seqStart1.crossWithSequence(Arrays.asList(
        new String[] {"t"}
    ));
    SequenceSet seqStart2 = en.new SequenceSet();seqStart2.crossWithSequence(Arrays.asList(
        new String[] {"t"}
    ));
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  public final void test_sequenceSet_equality0c()
  {
    SequenceSet seqStart1 = en.new SequenceSet();seqStart1.crossWithSequence(Arrays.asList(
        new String[] {"t"}
    ));
    SequenceSet seqStart2 = en.new SequenceSet();seqStart2.crossWithSequence(Arrays.asList(
        new String[] {"t"}
    ));
    SequenceSet seqDifferent1 = en.new SequenceSet();seqDifferent1.setIdentity();
    SequenceSet seqDifferent2 = en.new SequenceSet();seqDifferent2.setIdentity();seqDifferent2.cross(TestFSMAlgo.buildList(new String[][] {
        new String[] {"a"}
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  public final void test_stringCollectionSize1()
  {
    fsm = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A-b->B", "test_sequenceSet3_6"),config);
    en = new PTA_FSMStructure(fsm);   
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    seq.crossWithSequence(Arrays.asList(new String[] {"b","a"}));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"b","a"}
    });
    int expectedCompressed = 2, expectedUncompressed = 2;
    assertEquals(expectedCompressed, PTASequenceEngine.stringCollectionSize(en).secondElem.intValue());
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

        new String[] {"b","b"}
    });
   
    // now modify the filtered one
    SequenceSet filteredSeqSet = filtered.new SequenceSet();filteredSeqSet.setIdentity();
    filteredSeqSet.crossWithSequence(Arrays.asList(new String[]{"b","b","b","b"}));
    // and check that the filtered one has been modified but the original one is unchanged
    vertifyPTA(en, 2, new String[][] {
        new String[] {"a","b","c"},
        new String[] {"b","b","c"}
    });
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  public static void addToGraph_tmp(LearnerGraph g, List<String> initPath, LearnerGraph what)
  {
    PTASequenceEngine engine = new PTASequenceEngine();
    engine.init(new PTASequenceSetAutomaton());   
    SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();initSet.crossWithSequence(initPath);
   
    for(Entry<CmpVertex,Map<String,CmpVertex>> entry:what.transitionMatrix.entrySet())
    {// for all states in our new machine, compute paths to them.
      SequenceSet result = engine.new SequenceSet();
      what.paths.computePathsSBetween(what.init, entry.getKey(), initSet, result);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

  @Test
  public final void test_sequenceSet5_2() // a more complex composition
  {
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    seq.crossWithSequence(labelList(new String[] {"a","b","c"})).crossWithSet(new LinkedList<Label>());
    Map<String,String> actual = getDebugDataMap(en,en.new SequenceSet().cross(TestFSMAlgo.buildList(new String[][] {// here the new sequenceSet is empty, hence whatever I do, there should be no changes
        new String[] {"a","b","c","d"},
        new String[] {"c"}
    },mainConfiguration,converter)));
    vertifyPTA(en, 1, new String[][] {
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSequence()

    SequenceSet seqStart1 = en.new SequenceSet();
    SequenceSet seqStart2 = seqStart1.crossWithSequence(labelList(
        new String[] {"a"}
    ));
    SequenceSet seqDifferent1 = en.new SequenceSet();seqDifferent1.setIdentity();
    SequenceSet seqDifferent2 = en.new SequenceSet();seqDifferent2.setIdentity();seqDifferent2.crossWithSequence(labelList(
        new String[] {"a"}
    ));
    equalityTestingHelper(seqStart1,seqStart2,seqDifferent1,seqDifferent2, true);
  }
 
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.