Package net.wigis.greg

Examples of net.wigis.greg.NextNode


      tmp = (ArrayList<DNVNode>) nodeBeingVisited.getNeighbors(true);
     
      temp = nodeBeingVisitedWeight+1;
      for(int i=0;i<tmp.size();i++)
      {
        nextNode.add(new NextNode(tmp.get(i),temp));

      }
     
      //Add the current node to the visited node list
      visitedNode.put(nodeBeingVisited,nodeBeingVisitedWeight);
     
      //While the next node list is not empty
      while(nextNode.isEmpty() == false)
      {
        //Get the current node being visited
        nodeBeingVisited = nextNode.get(0).getNode();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
       
        //if the node hasn't been visited yet
        if(visitedNode.containsKey(nodeBeingVisited) == false)
        {
          nodeBeingVisitedWeight = nextNode.get(0).getWeight();
         
          //get its neighbors & add them at the end of the next node list
          tmp = (ArrayList<DNVNode>) nodeBeingVisited.getNeighbors(true);
          temp = nodeBeingVisitedWeight + 1;
          for(int x=0;x<tmp.size();x++)
          {
            nextNode.add(new NextNode(tmp.get(x),temp));
          }
         
          //add the current node into the visited node list
          visitedNode.put(nodeBeingVisited,nodeBeingVisitedWeight);
        }
View Full Code Here


      temp = nodeBeingVisitedWeight+1;
      for(int i=0;i<tmp.size();i++)
      {
        for(int y=0;y<selectedNodes.size();y++){
          if(tmp.get(i).equals(selectedNodes.get(y))){
            nextNode.add(new NextNode(tmp.get(i),temp));
          }
        }
      }
     
      //Add the current node to the visited node list
      visitedNode.put(nodeBeingVisited,nodeBeingVisitedWeight);
     
      //While the next node list is not empty
      while(nextNode.isEmpty() == false)
      {
        //Get the current node being visited
        nodeBeingVisited = nextNode.get(0).getNode();
       
        //if the node hasn't been visited yet
        if(visitedNode.containsKey(nodeBeingVisited) == false)
        {
          nodeBeingVisitedWeight = nextNode.get(0).getWeight();
         
          //get its neighbors & add them at the end of the next node list
          tmp = (ArrayList<DNVNode>) nodeBeingVisited.getNeighbors(true);
          temp = nodeBeingVisitedWeight + 1;
          for(int x=0;x<tmp.size();x++)
          {
            for(int y=0;y<selectedNodes.size();y++){
              if(tmp.get(x).equals(selectedNodes.get(y))){
                nextNode.add(new NextNode(tmp.get(x),temp));
              }
            }
          }
         
          //add the current node into the visited node list
View Full Code Here

TOP

Related Classes of net.wigis.greg.NextNode

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.