Package org.aisearch.data

Examples of org.aisearch.data.INode


    for (MetaArtefactOperation nextOperation : availableOperations) {
      if (nextOperation.equals(operation))
        continue;
      if (!nextOperation.getSourceType().equals(targetType))
        continue;
      INode node = new Node(nextOperation, availableOperations);
      edges.add(new Edge(node, 1));
    }
    return edges;
  }
View Full Code Here


      if (!(f.getSourceType().equals(f.getTargetType())))
        transformationOperations.add(f);
  }

  public List<XMLArtefactOperation> search(String startType, String goalType) {
    INode startNode = new Node(startType, transformationOperations);
    List<String> goalTypes = new ArrayList<String>();
    goalTypes.add(goalType);
    IGoalTest goalTest = new GoalTest(goalTypes);
    IQueueInserter queueInserter = new BoundedUniformCostInserter(MAX_COSTS);
View Full Code Here

      String type = integrator.getSupportedType();
      if (!goalTypes.contains(type))
        goalTypes.add(type);
    }

    INode startNode = new Node(startType, transformationOperations);
    IGoalTest goalTest = new GoalTest(goalTypes);
    IQueueInserter queueInserter = new BoundedUniformCostInserter(MAX_COSTS);

    List<XMLArtefactOperation> operations = search(startNode, goalTest,
        queueInserter);
View Full Code Here

    while (true) {
      if (queue.isEmpty())
        return null;
      Path bestPath = queue.remove(0);
      INode currentNode = bestPath.getLastEdge().getTargetNode();
      if (goalTest.isGoal(currentNode))
        return bestPath;
      List<Path> newPaths = new ArrayList<Path>();
      for (Edge edge : currentNode.generateSuccessors()) {
        if (bestPath.containsNode(edge.getTargetNode()))
          continue;
        newPaths.add(new Path(bestPath, edge));
      }
      queueInserter.insert(queue, newPaths);
View Full Code Here

TOP

Related Classes of org.aisearch.data.INode

Copyright © 2018 www.massapicom. 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.