Examples of BasicPath


Examples of org.encog.ml.graph.BasicPath

  public AbstractGraphSearch(BasicGraph theGraph, BasicNode startingPoint, SearchGoal theGoal)
  {
    this.graph = theGraph;
    this.goal = theGoal;
    frontier.add(new BasicPath(startingPoint));
  }
View Full Code Here

Examples of org.encog.ml.graph.BasicPath

         
      if( this.frontier.size()==0 ) {
        throw new EncogError("Frontier is empty, cannot find solution.");
      }
     
      BasicPath path = this.frontier.pop();

      if (this.goal.isGoalMet(path)) {
        this.solution = path;
        return;
      }

      BasicNode state = path.getDestinationNode();
      this.explored.add(state);
     
      for (BasicEdge connection : state.getConnections()) {
        if( !this.explored.contains(connection.getTo()) &&
          !this.frontier.containsDestination(connection.getTo())) {
          BasicPath path2 = new BasicPath(path, connection.getTo());
          this.frontier.add(path2);
        }
      }
    }
  }
View Full Code Here

Examples of org.encog.ml.graph.BasicPath

 
  public BasicPath pop() {
    if( contents.size()==0 )
      return null;
   
    BasicPath result = contents.get(0);
    contents.remove(0);
    return result;
  }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

        //build cli archive
        EnterpriseArchive cliArchive = ShrinkWrap.create(EnterpriseArchive.class, "archive.cli");
        String deploy = "deploy deployment0.war\ndeploy deployment1.war";
        String undeploy = "undeploy deployment0.war\nundeploy deployment1.war";
        cliArchive.add(new StringAsset(deploy), new BasicPath("/", "deploy.scr"));
        cliArchive.add(new StringAsset(undeploy), new BasicPath("/", "undeploy.scr"));
        for (WebArchive war : wars) {
            cliArchive.add(war, new BasicPath("/"), ZipExporter.class);
        }
        cliArchiveFile = new File(tempDir + File.separator + "archive.cli");
        new ZipExporterImpl(cliArchive).exportTo(cliArchiveFile, true);

        AbstractCliTestBase.initCLI();
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

        WebArchive war = ShrinkWrap.create(WebArchive.class, "single.war");
        war.addAsWebResource(new StringAsset("a"), "a.txt");
        war.addAsWebResource(new StringAsset("b"), "b.txt");

        JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar");
        jar.addAsManifestResource(new StringAsset("b - overlay"), new BasicPath("resources", "b.txt"));
        jar.addAsManifestResource(new StringAsset("c - overlay"), new BasicPath("resources", "c.txt"));

        war.addAsLibrary(jar);
        return war;
    }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

        //build cli archive
        EnterpriseArchive cliArchive = ShrinkWrap.create(EnterpriseArchive.class, "archive.cli");
        String deploy = "deploy deployment0.war\ndeploy deployment1.war";
        String undeploy = "undeploy deployment0.war\nundeploy deployment1.war";
        cliArchive.add(new StringAsset(deploy), new BasicPath("/", "install.scr"));
        // add the default script which shouldn't be picked up
        cliArchive.add(new StringAsset("deploy deployment0.war\ndeploy deployment1.war\ndeploy deployment2.war"), new BasicPath("/", "deploy.scr"));
        cliArchive.add(new StringAsset(undeploy), new BasicPath("/", "uninstall.scr"));
        cliArchive.add(new StringAsset("undeploy deployment0.war\nundeploy deployment1.war\nundeploy deployment2.war"), new BasicPath("/", "undeploy.scr"));
        for (WebArchive war : wars) {
            cliArchive.add(war, new BasicPath("/"), ZipExporter.class);
        }
        cliArchiveFile = new File(tempDir + File.separator + "archive.cli");
        new ZipExporterImpl(cliArchive).exportTo(cliArchiveFile, true);
    }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

        // deployment4
        war = ShrinkWrap.create(WebArchive.class, "cli-test-app3.war");
        war.addClass(SimpleServlet.class);
        war.addAsWebResource(new StringAsset("Version3"), "page.html");
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "cli-test-app.ear");
        ear.add(war, new BasicPath("/"), ZipExporter.class);
        appFiles[3] = new File(tempDir + File.separator + ear.getName());
        new ZipExporterImpl(ear).exportTo(appFiles[3], true);
    }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

        //build cli archive
        EnterpriseArchive cliArchive = ShrinkWrap.create(EnterpriseArchive.class, "archive.cli");
        String deploy = "deploy deployment0.war\ndeploy deployment1.war";
        String undeploy = "undeploy deployment0.war\nundeploy deployment1.war";
        cliArchive.add(new StringAsset(deploy), new BasicPath("/", "deploy.scr"));
        cliArchive.add(new StringAsset(undeploy), new BasicPath("/", "undeploy.scr"));
        for (WebArchive war : wars) {
            cliArchive.add(war, new BasicPath("/"), ZipExporter.class);
        }
        cliArchiveFile = new File(tempDir + File.separator + "archive.cli");
        new ZipExporterImpl(cliArchive).exportTo(cliArchiveFile, true);
    }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

     * @return
     */
    public static ArchivePath getFullPathForClassResource(Class<?> clazz) {
        String classResourceDelimiter = clazz.getName().replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH);
        String classFullPath = classResourceDelimiter + EXTENSION_CLASS;
        return new BasicPath(classFullPath);
    }
View Full Code Here

Examples of org.jboss.shrinkwrap.impl.base.path.BasicPath

     * @return
     */
    public static ArchivePath getFullPathForClassResource(String className) {
        String classResourceDelimiter = className.replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH);
        String classFullPath = classResourceDelimiter + EXTENSION_CLASS;
        return new BasicPath(classFullPath);
    }
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.