Package org.woped.quantana.graph

Examples of org.woped.quantana.graph.Node


    unfoldNet(graph, lambda, epsilon);

    Node[] origNet = graph.getNodeArray();
    for (Key k : unfoldedNet.keySet()) {
      String id = k.getId();
      Node n = origNet[graph.getNodeIdx(id)];
      n.setNumOfRuns(n.getNumOfRuns() + k.getRuns());
    }
  }
View Full Code Here


        n.setJoinReached(false);

      n.setNumOfRuns(0);
    }

    Node s = g.getStartPlace();
    Node n = new Node(s.getId(), s.getName());
    n.setTempRuns(lambda);
    s.incIteration();
    n.setIteration(s.getIteration());
    Key start = new Key(n.getId(), lambda);
    unfoldedNet.put(start, n);

    LinkedList<NodePair> queue = new LinkedList<NodePair>();
    queue.addLast(new NodePair(s, n));
    runThroughNet(queue);
View Full Code Here

  private void runThroughNet(LinkedList<NodePair> q) {
    if (!(q.isEmpty())) {
      NodePair np = q.removeFirst();
     
      for (Arc a : np.getFirst().getSuccessor()) {
        Node m = a.getTarget();
        if (!m.isJoinReached()) {
          double val = a.getProbability() * np.getSecond().getTempRuns();
          if (!(val < epsilon)) {
            Node y = new Node(m.getId(), m.getName());
            y.setTempRuns(val);
            m.incIteration();
            y.setIteration(m.getIteration());
            if (m.isAndJoin())
              m.setJoinReached(true);
            np.getSecond().getSuccessor().add(new Arc(y, a.getProbability()));
            Key k = new Key(m.getId(), val);
            unfoldedNet.put(k, y);
View Full Code Here

TOP

Related Classes of org.woped.quantana.graph.Node

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.