Package statechum.analysis.learning.rpnicore.GDLearnerGraph

Examples of statechum.analysis.learning.rpnicore.GDLearnerGraph.DetermineDiagonalAndRightHandSide.compute()


    try {// based on http://forums.sun.com/thread.jspa?threadID=767974
      anotherMather = matcher.getClass().getDeclaredConstructor(new Class[]{GDLearnerGraph.class}).newInstance(new Object[]{gdlearnerGraph});
    } catch (Exception e) {
      Assert.fail("Unexpected exception cloning a matcher: "+e);
    }
    anotherMather.compute(gr.findVertex(B),gr.findVertex(A),
        matrixND.transitionMatrix.get(gr.findVertex(B)),matrixND.transitionMatrix.get(gr.findVertex(A)));

    Assert.assertEquals("right-hand side",anotherMather.getRightHandSide(),rightHand,Configuration.fpAccuracy);
    Assert.assertEquals("right-hand side",anotherMather.getDiagonal(),diag,Configuration.fpAccuracy);
  }
View Full Code Here


      while(stateB_It.hasNext())
      {
        Entry<CmpVertex,Map<String,List<CmpVertex>>> stateB = stateB_It.next();

        int currentStatePair = ndGraph.vertexToIntNR(stateB.getKey(),entryA.getKey());
        ddrhInstance.compute(entryA.getKey(),stateB.getKey(),entryA.getValue(),stateB.getValue());
        result.setQuick(currentStatePair, ddrhInstance.getRightHandSide());
       
        if (stateB.getKey().equals(entryA.getKey())) break; // we only process a triangular subset.
      }
    }
View Full Code Here

    try {// based on http://forums.sun.com/thread.jspa?threadID=767974
      anotherMather = matcher.getClass().getDeclaredConstructor(new Class[]{GDLearnerGraph.class}).newInstance(new Object[]{gdlearnerGraph});
    } catch (Exception e) {
      Assert.fail("Unexpected exception cloning a matcher: "+e);
    }
    anotherMather.compute(gr.findVertex(B),gr.findVertex(A),
        matrixND.transitionMatrix.get(gr.findVertex(B)),matrixND.transitionMatrix.get(gr.findVertex(A)));

    Assert.assertEquals("right-hand side",anotherMather.getRightHandSide(),rightHand,Configuration.fpAccuracy);
    Assert.assertEquals("right-hand side",anotherMather.getDiagonal(),diag,Configuration.fpAccuracy);
  }
View Full Code Here

      while(stateB_It.hasNext())
      {
        Entry<CmpVertex,Map<String,List<CmpVertex>>> stateB = stateB_It.next();

        int currentStatePair = ndGraph.vertexToIntNR(stateB.getKey(),entryA.getKey());
        ddrhInstance.compute(entryA.getKey(),stateB.getKey(),entryA.getValue(),stateB.getValue());
        result.setQuick(currentStatePair, ddrhInstance.getRightHandSide());
       
        if (stateB.getKey().equals(entryA.getKey())) break; // we only process a triangular subset.
      }
    }
View Full Code Here

    try {
      anotherMather = matcher.getClass().newInstance();
    } catch (Exception e) {
      Assert.fail("Unexpected exception cloning a matcher: "+e);
    }
    anotherMather.compute(!AbstractLearnerGraph.checkCompatible(gr.findVertex(B),gr.findVertex(A), gr.incompatibles),
        matrixND.transitionMatrix.get(gr.findVertex(B)),matrixND.transitionMatrix.get(gr.findVertex(A)));
    Assert.assertEquals("right-hand side",anotherMather.getRightHandSide(),rightHand);
    Assert.assertEquals("right-hand side",anotherMather.getDiagonal(),diag);
  }
 
View Full Code Here

      while(stateB_It.hasNext())
      {
        Entry<CmpVertex,Map<String,List<CmpVertex>>> stateB = stateB_It.next();

        int currentStatePair = ndGraph.vertexToIntNR(stateB.getKey(),entryA.getKey());
        ddrhInstance.compute(!AbstractLearnerGraph.checkCompatible(entryA.getKey(),stateB.getKey(),gr.incompatibles),entryA.getValue(),stateB.getValue());
        result.setQuick(currentStatePair, ddrhInstance.getRightHandSide());
       
        if (stateB.getKey().equals(entryA.getKey())) break; // we only process a triangular subset.
      }
    }
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.