Examples of InitialData


Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail2()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element positiveToRemove = (Element)StatechumXML.getChildWithTag(initElement,StatechumXML.ELEM_SEQ.name()).item(0);
    initElement.removeChild(positiveToRemove);
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail3()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(dumper.labelio.writeSequenceList(StatechumXML.ATTR_POSITIVE_SEQUENCES.name(), justSomething));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail4()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element negativeToRemove = (Element)initElement.getElementsByTagName(StatechumXML.ELEM_SEQ.name()).item(1);// the second one
    initElement.removeChild(negativeToRemove);
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail5()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(dumper.labelio.writeSequenceList(StatechumXML.ATTR_NEGATIVE_SEQUENCES.name(), justSomething));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail6()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element graphToRemove = (Element)StatechumXML.getChildWithTag(initElement,StatechumXML.graphmlNodeNameNS.toString()).item(0);
    initElement.removeChild(graphToRemove);
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
   
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail7()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(buildLearnerGraph("A-a->A", "testLoadInit_fail7",config,converter)
      .storage.createGraphMLNode(dumper.doc));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail12()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(dumper.doc.createElement("junk"));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  @Test
  public final void testLoadInit_fail13()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element testSequences = (Element)StatechumXML.getChildWithTag(initElement,StatechumXML.ELEM_SEQ.name()).item(0);
    testSequences.removeAttribute(StatechumXML.ATTR_SEQ.name());testSequences.setAttribute(StatechumXML.ATTR_SEQ.name(), "junk");
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

        new String[]{"5"}
    });

    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    dumper.topElement.appendChild(initElement);dumper.close();
    xmlData = output.toString();
  }
View Full Code Here

Examples of statechum.analysis.learning.observers.ProgressDecorator.InitialData

  }

  @Test
  public final void createInitialData()
  {
    InitialData data = new InitialData(plus,5,minus,4,graph);
    Assert.assertEquals(5,data.plusSize);Assert.assertEquals(4, data.minusSize);
    Assert.assertSame(plus,data.plus);Assert.assertSame(minus,data.minus);Assert.assertSame(graph,data.graph);
  }
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.