Examples of initEmpty()


Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

    Assert.assertEquals(fsm.getInit(),MarkovPassivePairSelection.findVertexWithMostTransitions(fsm, MarkovClassifier.computeInverseGraph(fsm)));
 
  @Test
  public void testConstructSurroundingTransitions11()
  {
    final LearnerGraph fsm = new LearnerGraph(config);fsm.initEmpty();
    Assert.assertNull(MarkovPassivePairSelection.findVertexWithMostTransitions(fsm, MarkovClassifier.computeInverseGraph(fsm)));
  }
 
 
  @Test
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

 
 
  @Test
  public void testUniquePaths1()
  {
    final LearnerGraph fsm = new LearnerGraph(config);fsm.initEmpty();
    Helper.checkForCorrectException(new whatToRun() {
      @Override
      public void run()
      {
        MarkovClassifier.calculateFractionOfStatesIdentifiedBySingletons(fsm);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

    Assert.assertEquals(fsm.getInit(),MarkovPassivePairSelection.findVertexWithMostTransitions(fsm, MarkovClassifier.computeInverseGraph(fsm)));
 
  @Test
  public void testConstructSurroundingTransitions11()
  {
    final LearnerGraph fsm = new LearnerGraph(config);fsm.initEmpty();
    Assert.assertNull(MarkovPassivePairSelection.findVertexWithMostTransitions(fsm, MarkovClassifier.computeInverseGraph(fsm)));
  }
 
 
  @Test
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

 
 
  @Test
  public void testUniquePaths1()
  {
    final LearnerGraph fsm = new LearnerGraph(config);fsm.initEmpty();
    Helper.checkForCorrectException(new whatToRun() {
      @Override
      public void run()
      {
        MarkovClassifier.calculateFractionOfStatesIdentifiedBySingletons(fsm);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

  @Test
  public final void testRelabelling2()
  {
    LearnerGraph gr = new LearnerGraph(Configuration.getDefaultConfiguration()), result = new LearnerGraph(Configuration.getDefaultConfiguration());
    LearnerGraph expected = new LearnerGraph(Configuration.getDefaultConfiguration());
    gr.initEmpty();expected.initEmpty();
    final LearnerGraphMutator<CmpVertex,LearnerGraphCachedData> patcher = new LearnerGraphMutator<CmpVertex,LearnerGraphCachedData>(gr, cloneConfig,null);
    patcher.relabel(result);
    Assert.assertEquals(expected,result);
  }
 
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

  }
 
  @Test
  public void testAutomatonConnected1()
  {
    LearnerGraph graph = new LearnerGraph(mainConfiguration);graph.initEmpty();
    Assert.assertNull(PairQualityLearner.uniqueFromInitial(graph));
    Assert.assertTrue(graph.pathroutines.automatonConnected());
    LearnerGraph actual = new LearnerGraph(mainConfiguration);graph.pathroutines.removeReachableStatesFromWhichInitIsNotReachable(actual);
    Assert.assertTrue(actual.transitionMatrix.isEmpty());Assert.assertNull(actual.getInit());
  }
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.initEmpty()

  @Test
  public final void testRelabelling2()
  {
    LearnerGraph gr = new LearnerGraph(Configuration.getDefaultConfiguration()), result = new LearnerGraph(Configuration.getDefaultConfiguration());
    LearnerGraph expected = new LearnerGraph(Configuration.getDefaultConfiguration());
    gr.initEmpty();expected.initEmpty();
    final LearnerGraphMutator<CmpVertex,LearnerGraphCachedData> patcher = new LearnerGraphMutator<CmpVertex,LearnerGraphCachedData>(gr, cloneConfig,null);
    patcher.relabel(result);
    Assert.assertEquals(expected,result);
  }
 
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.initEmpty()

   * @return inverted graph
   */
  public static LearnerGraphND computeInverseGraph(LearnerGraph graph)
  {
    Configuration shallowCopy = graph.config.copy();shallowCopy.setLearnerCloneGraph(false);
    LearnerGraphND inverseGraph = new LearnerGraphND(shallowCopy);inverseGraph.initEmpty();
    AbstractPathRoutines.buildInverse(graph,LearnerGraphND.ignoreNone,inverseGraph)// do the inverse to the tentative graph
    return inverseGraph;
  }
 
  /** Obtains the graph that can be used in calls of {@link #checkFanoutInconsistency(AbstractLearnerGraph, boolean, LearnerGraph, CmpVertex, int)} and many others.
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.initEmpty()

   * @return inverted graph
   */
  public static LearnerGraphND computeInverseGraph(LearnerGraph graph)
  {
    Configuration shallowCopy = graph.config.copy();shallowCopy.setLearnerCloneGraph(false);
    LearnerGraphND inverseGraph = new LearnerGraphND(shallowCopy);inverseGraph.initEmpty();
    AbstractPathRoutines.buildInverse(graph,LearnerGraphND.ignoreNone,inverseGraph)// do the inverse to the tentative graph
    return inverseGraph;
  }
 
  /** Obtains the graph that can be used in calls of {@link #checkFanoutInconsistency(AbstractLearnerGraph, boolean, LearnerGraph, CmpVertex, int)} and many others.
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.initEmpty()

      forwardOrInverseGraph = new LearnerGraphND(graph,graph.config);
    }
    else
    {
      Configuration shallowCopy = graph.config.copy();shallowCopy.setLearnerCloneGraph(false);
      forwardOrInverseGraph = new LearnerGraphND(shallowCopy);forwardOrInverseGraph.initEmpty();
      AbstractPathRoutines.buildInverse(graph,LearnerGraphND.ignoreNone,forwardOrInverseGraph)// do the inverse to the tentative graph
    }

    Map<CmpVertex,LearnerGraph> outcome = new TreeMap<CmpVertex,LearnerGraph>();
    for(CmpVertex v:graph.transitionMatrix.keySet())
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.