Examples of InitialData


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,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element graphToRemove = (Element)initElement.getElementsByTagName(Transform322.graphmlNodeName).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,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    initElement.appendChild(new FSMStructure(TestFSMAlgo.buildGraph("A-a->A", "testLoadInit_fail7"),Configuration.getDefaultConfiguration())
      .transform322.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,Configuration.getDefaultConfiguration(),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);
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,Configuration.getDefaultConfiguration(),false);
    Element initElement = dumper.writeInitialData(new InitialData(plus,plus.size(),minus,minus.size(),graph));
    Element testSequences = (Element)initElement.getElementsByTagName(ELEM_KINDS.ELEM_SEQ.name()).item(0);
    testSequences.removeAttribute(ELEM_KINDS.ATTR_SEQ.name());testSequences.setAttribute(ELEM_KINDS.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"}
    },config,converter);

    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));
    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

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

  public final void createInitialData_fail1()
  {
    checkForCorrectException(new whatToRun() {
    @SuppressWarnings("unused")
    public @Override void run() {
      new InitialData(new LinkedList<List<Label>>(),-1,new LinkedList<List<Label>>(),0,null);
    }},IllegalArgumentException.class,"inconsistent positive");
  }
View Full Code Here

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

  public final void createInitialData_fail2()
  {
    checkForCorrectException(new whatToRun() {
    @SuppressWarnings("unused")
    public @Override void run() {
      new InitialData(new LinkedList<List<Label>>(),0,new LinkedList<List<Label>>(),5,null);
    }},IllegalArgumentException.class,"inconsistent negative");
  }
View Full Code Here

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

  public final void testLoadInit1()
  {
    LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    loader.config = config;
    loader.initIO(loader.doc, loader.config);
    InitialData data=loader.readInitialData(loader.expectNextElement(StatechumXML.ELEM_INIT.name()));
    Assert.assertEquals(plus.size(),data.plusSize);Assert.assertEquals(minus.size(), data.minusSize);
    Assert.assertEquals(plus,data.plus);Assert.assertEquals(minus,data.minus);
    Assert.assertEquals(graph,data.graph);
  }
View Full Code Here

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

        .replace("<"+StatechumXML.ATTR_POSITIVE_SIZE.name(), "<"+StatechumXML.ATTR_POSITIVE_SIZE.name()+" AA=\"34\" ")
        .replace("<"+StatechumXML.ATTR_NEGATIVE_SIZE.name(), "<"+StatechumXML.ATTR_NEGATIVE_SIZE.name()+" AB=\"TT\" ")
        .getBytes()),false,converter);
    loader.config = config;
    loader.initIO(loader.doc, loader.config);
    InitialData data=loader.readInitialData(loader.expectNextElement(StatechumXML.ELEM_INIT.name()));
    loader.config = config;
    Assert.assertEquals(plus.size(),data.plusSize);Assert.assertEquals(minus.size(), data.minusSize);
    Assert.assertEquals(plus,data.plus);Assert.assertEquals(minus,data.minus);Assert.assertEquals(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.