Examples of DeterministicVertex


Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

    }
    long lastScore = -1;
    for(StatePair elem:pairs)
    {
      doneEdges = new HashSet<DirectedSparseEdge>();
      DeterministicVertex origBlue = DeterministicDirectedSparseGraph.findVertexNamed(elem.getQ(), g);
      DeterministicVertex origRed = DeterministicDirectedSparseGraph.findVertexNamed(elem.getR(), g);
      long currentScore = computeScore(g, new OrigStatePair(origBlue,origRed));// This one returns vertices from g, but elem may easily contain StringVertices and such, hence convert elem to Vertex-pair.
      PairScore elA = constructPairScore(elem.getQ().getStringId(),elem.getR().getStringId(),currentScore, testConfig);
      PairScore elB = constructPairScore(elem.getR().getStringId(),elem.getQ().getStringId(),currentScore, testConfig);
      Assert.assertTrue(elem.getR().getColour() == JUConstants.RED);
      Assert.assertTrue(elem.getQ().getColour() == JUConstants.BLUE);
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

  {
    synchronized(syncObj)
    {
      return conf.isLearnerUseStrings()?
          new StringVertex(name):
          new DeterministicVertex(name);     
    }   
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

 
  /** Tests that I can assign colours meaningfully on Deterministic and String vertices. */
  @Test
  public final void testColourSetting1()
  {
    testColourHelper(new DeterministicVertex("testA"));
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

  {
    Configuration conf = Configuration.getDefaultConfiguration();conf.setAllowedToCloneNonCmpVertex(false);
    conf.setLearnerCloneGraph(true);
   
    conf.setLearnerUseStrings(true);
    CmpVertex vA = new DeterministicVertex("test vertex");vA.setColour(JUConstants.RED);
    cloneTestHelper(vA, conf);
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

  {
    Configuration conf = Configuration.getDefaultConfiguration();conf.setAllowedToCloneNonCmpVertex(false);
    conf.setLearnerCloneGraph(true);
   
    conf.setLearnerUseStrings(false);
    CmpVertex vB = new DeterministicVertex("test vertex");vB.setColour(JUConstants.RED);
    cloneTestHelper(vB, conf);
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

 
  /** Tests that types are correctly converted. */
  @Test
  public final void testAddUserData_name1()
  {
    DeterministicVertex vA=new DeterministicVertex("a");
   
    // here I cannot add, only set since the ID has already been set.
    vA.setUserDatum(JUConstants.LABEL, new VertexID("name"), UserData.SHARED);Assert.assertEquals("name", vA.getID().toString());
    vA.setUserDatum(JUConstants.LABEL, new VertexID("D"), UserData.SHARED);Assert.assertEquals("D", vA.getID().toString());

    DeterministicVertex vS=new DeterministicVertex("a");
    vS.setUserDatum(JUConstants.LABEL, new VertexID("name"), UserData.SHARED);Assert.assertEquals("name", vS.getID().toString());
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

 
  /** Tests that types are correctly converted. */
  @Test
  public final void testAddUserData_name2()
  {
    DeterministicVertex vA=new DeterministicVertex("a");

    // here I cannot add, only set since the ID has already been set.
    vA.setUserDatum("lAbel", new VertexID("name"), UserData.SHARED);Assert.assertEquals("name", vA.getID().toString());
    vA.setUserDatum("labEl", new VertexID("D"), UserData.SHARED);Assert.assertEquals("D", vA.getID().toString());

    DeterministicVertex vS=new DeterministicVertex("a");
    vS.setUserDatum("laBel", new VertexID("name"), UserData.SHARED);Assert.assertEquals("name", vS.getID().toString());
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

 
  /** Tests that types are correctly converted. */
  @Test
  public final void testAddUserData_accepted1()
  {
    DeterministicVertex vA=new DeterministicVertex("a");
    vA.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);Assert.assertTrue(vA.isAccept());
    vA.setUserDatum(JUConstants.ACCEPTED, "false", UserData.SHARED);Assert.assertFalse(vA.isAccept());

    DeterministicVertex vS=new DeterministicVertex("a");
    vS.setUserDatum(JUConstants.ACCEPTED, "false", UserData.SHARED);Assert.assertFalse(vS.isAccept());
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

 
  /** Tests that types are correctly converted. */
  @Test
  public final void testAddUserData_accepted2()
  {
    DeterministicVertex vA=new DeterministicVertex("a");
    vA.addUserDatum("acCepted", "truE", UserData.SHARED);Assert.assertTrue(vA.isAccept());
    vA.setUserDatum("accePted", "faLse", UserData.SHARED);Assert.assertFalse(vA.isAccept());

    DeterministicVertex vS=new DeterministicVertex("a");
    vS.setUserDatum("acceptEd", "fAlse", UserData.SHARED);Assert.assertFalse(vS.isAccept());
  }
View Full Code Here

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

  }
 
  @Test(expected=IllegalUserDataException.class)
  public final void testAddUserData_accepted_fail1()
  {
    DeterministicVertex vA=new DeterministicVertex("a");
    vA.addUserDatum("accePted", "junk", UserData.SHARED);
  }
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.