Package statechum.Configuration

Examples of statechum.Configuration.ScoreMode


    {
      @Override
      public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
      {
        // Check that compatibility score computation gives the same response as if we did merge and computed a difference between the number of states.
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
        LearnerGraph outcome = super.MergeAndDeterminize(original, pair);
        Assert.assertEquals(compatibilityScore+1,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here


            extraPhantomVertices = 1;// now certain it was indeed a phantom vertex added when the PTA was initially built.
          }
         
          Assert.assertEquals(score+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
        }
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
       
        Assert.assertEquals(compatibilityScore+1+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here

    {
      @Override
      public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
      {
        // Check that compatibility score computation gives the same response as if we did merge and computed a difference between the number of states.
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
        LearnerGraph outcome = super.MergeAndDeterminize(original, pair);
        Assert.assertEquals(compatibilityScore+1,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here

    {
      @Override
      public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
      {
        // Check that compatibility score computation gives the same response as if we did merge and computed a difference between the number of states.
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
        LearnerGraph outcome = super.MergeAndDeterminize(original, pair);
        Assert.assertEquals(compatibilityScore+1,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here

    {
      @Override
      public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
      {
        // Check that compatibility score computation gives the same response as if we did merge and computed a difference between the number of states.
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
        LearnerGraph outcome = super.MergeAndDeterminize(original, pair);
        Assert.assertEquals(compatibilityScore+1,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here

      for(PairScore p:pairs)
      {
        if (p.getR() == pair.getR())
          ++m.nrOfAlternatives;
      }
      ScoreMode origScore = graph.config.getLearnerScoreMode();graph.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
      m.compatibilityScore = graph.pairscores.computePairCompatibilityScore(pair);
      graph.config.setLearnerScoreMode(origScore);

      measurementsForCurrentStack.put(pair,m);
    }
View Full Code Here

            extraPhantomVertices = 1;// now certain it was indeed a phantom vertex added when the PTA was initially built.
          }
         
          Assert.assertEquals(score+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
        }
        ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
        long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
        original.config.setLearnerScoreMode(origScore);
       
        Assert.assertEquals(compatibilityScore+1+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
        return outcome;
View Full Code Here

          ++m.nrOfAlternatives;
      }
     
      Collection<CmpVertex> adjacentOutgoingBlue = tentativeGraph.transitionMatrix.get(pair.getQ()).values(), adjacentOutgoingRed = tentativeGraph.transitionMatrix.get(pair.getR()).values();
      m.adjacent = adjacentOutgoingBlue.contains(pair.getR()) || adjacentOutgoingRed.contains(pair.getQ());
      ScoreMode origScore = tentativeGraph.config.getLearnerScoreMode();tentativeGraph.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
      m.compatibilityScore = tentativeGraph.pairscores.computePairCompatibilityScore(pair);
      tentativeGraph.config.setLearnerScoreMode(origScore);
     
      measurements.measurementsForComparators.put(pair,m);
    }
View Full Code Here

          ++m.nrOfAlternatives;
      }
     
      Collection<CmpVertex> adjacentOutgoingBlue = tentativeGraph.transitionMatrix.get(pair.getQ()).values(), adjacentOutgoingRed = tentativeGraph.transitionMatrix.get(pair.getR()).values();
      m.adjacent = adjacentOutgoingBlue.contains(pair.getR()) || adjacentOutgoingRed.contains(pair.getQ());
      ScoreMode origScore = tentativeGraph.config.getLearnerScoreMode();tentativeGraph.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
      m.compatibilityScore = tentativeGraph.pairscores.computePairCompatibilityScore(pair);
      tentativeGraph.config.setLearnerScoreMode(origScore);
     
      measurements.measurementsForComparators.put(pair,m);
    }
View Full Code Here

              extraPhantomVertices = 1;// now certain it was indeed a phantom vertex added when the PTA was initially built.
            }
           
            Assert.assertEquals(score+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
          }
          ScoreMode origScore = original.config.getLearnerScoreMode();original.config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
          long compatibilityScore = original.pairscores.computePairCompatibilityScore(pair);
          original.config.setLearnerScoreMode(origScore);
         
          Assert.assertEquals(compatibilityScore+1+extraPhantomVertices,original.getStateNumber()-outcome.getStateNumber());
          return outcome;
View Full Code Here

TOP

Related Classes of statechum.Configuration.ScoreMode

Copyright © 2018 www.massapicom. 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.