Examples of FilterPredicate


Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

    rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);
    for(int i=0;i<10;i++){
      final PTASequenceEngine samples = rpg.getAllSequences(i);
     
      PTASequenceEngine.FilterPredicate posPredicate = samples.getFSM_filterPredicate();
      PTASequenceEngine.FilterPredicate negPredicate = new FilterPredicate() {
        FilterPredicate origFilter = samples.getFSM_filterPredicate();
        public @Override boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
        }
      };
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      final PTASequenceEngine currentPTA = generator.getAllSequences(i);
      Collection<List<String>> currentSequences = currentPTA.getData(PTASequenceEngine.truePred);
      Assert.assertEquals("chunk "+i+" (neg) should be of length "+(2*posOrNegPerChunk*(i+1))+" but it was "+currentSequences.size(),(2*posOrNegPerChunk*(i+1)), currentSequences.size());
      int positive = 0,negative=0;
      PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
      PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
        FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
       
        @Override
        public boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      generator.getExtraSequences(1);
    }},IllegalArgumentException.class,"is out of range");
    Assert.assertTrue("PTA is not empty",generator.getExtraSequences(0).containsAsLeaf(Arrays.asList(new String[]{})));
    final PTASequenceEngine currentPTA = generator.getAllSequences(0);
    PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
    PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
      FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
     
      @Override
      public boolean shouldBeReturned(Object name) {
        return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      final PTASequenceEngine currentPTA = generator.getAllSequences(i);
      Collection<List<String>> currentSequences = currentPTA.getData(PTASequenceEngine.truePred);
      Assert.assertTrue(2*posOrNegPerChunk*(i+1)> currentSequences.size());
      int positive = 0,negative=0;
      PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
      PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
        FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
       
        @Override
        public boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

    rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);
    for(int i=0;i<10;i++){
      final PTASequenceEngine samples = rpg.getAllSequences(i);
     
      PTASequenceEngine.FilterPredicate posPredicate = samples.getFSM_filterPredicate();
      PTASequenceEngine.FilterPredicate negPredicate = new FilterPredicate() {
        FilterPredicate origFilter = samples.getFSM_filterPredicate();
        public @Override boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
        }
      };
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

  static Map<Integer,Set<List<Label>>> constructCollectionOfTraces(final Map<Integer,PTASequenceEngine> frameToEngine,final boolean positive)
  {
    Map<Integer,Set<List<Label>>> frameToTraces = new TreeMap<Integer,Set<List<Label>>>();
    for(Entry<Integer,PTASequenceEngine> entry:frameToEngine.entrySet())
    {
      final FilterPredicate existingPredicate = entry.getValue().getFSM_filterPredicate();
     
      Set<List<Label>> tracesForFrame = new HashSet<List<Label>>();
      tracesForFrame.addAll(entry.getValue().getData(new FilterPredicate()
      {
 
        @Override
        public boolean shouldBeReturned(Object name) {
          return existingPredicate.shouldBeReturned(name) == positive;
        }
       
      }));
      frameToTraces.put(entry.getKey(),tracesForFrame);
    }
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      final PTASequenceEngine currentPTA = generator.getAllSequences(i);
      Collection<List<Label>> currentSequences = currentPTA.getData(PTASequenceEngine.truePred);
      Assert.assertEquals("chunk "+i+" (neg) should be of length "+(2*posOrNegPerChunk*(i+1))+" but it was "+currentSequences.size(),(2*posOrNegPerChunk*(i+1)), currentSequences.size());
      int positive = 0,negative=0;
      PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
      PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
        FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
       
        @Override
        public boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      generator.getExtraSequences(1);
    }},IllegalArgumentException.class,"is out of range");
    Assert.assertTrue("PTA is not empty",generator.getExtraSequences(0).containsAsLeaf(labelList(new String[]{})));
    final PTASequenceEngine currentPTA = generator.getAllSequences(0);
    PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
    PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
      FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
     
      @Override
      public boolean shouldBeReturned(Object name) {
        return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      final PTASequenceEngine currentPTA = generator.getAllSequences(i);
      Collection<List<Label>> currentSequences = currentPTA.getData(PTASequenceEngine.truePred);
      Assert.assertTrue(2*posOrNegPerChunk*(i+1)> currentSequences.size());
      int positive = 0,negative=0;
      PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
      PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
        FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
       
        @Override
        public boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

      final PTASequenceEngine currentPTA = generator.getAllSequences(i);
      Collection<List<String>> currentSequences = currentPTA.getData(PTASequenceEngine.truePred);
      Assert.assertEquals("chunk "+i+" (neg) should be of length "+(2*posOrNegPerChunk*(i+1))+" but it was "+currentSequences.size(),(2*posOrNegPerChunk*(i+1)), currentSequences.size());
      int positive = 0,negative=0;
      PTASequenceEngine positivePTA = currentPTA.filter(currentPTA.getFSM_filterPredicate());
      PTASequenceEngine negativePTA = currentPTA.filter(new FilterPredicate() {
        FilterPredicate origFilter = currentPTA.getFSM_filterPredicate();
        public boolean shouldBeReturned(Object name) {
          return !origFilter.shouldBeReturned(name);
        }
      });
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.