001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 package graphlab.plugins.visualization.corebasics.util; 005 006 /** 007 * @author Rouzbeh Ebrahimi 008 */ 009 public class BFS { 010 // private static int BFS( Vector<Vertex> currentLevel, int maxLevel) { 011 // Vector<Vertex> nextLevel = new Vector<Vertex>(); 012 // for (Vertex v : currentLevel) { 013 // v.setMark(true); 014 // Iterator<EdgeModel> em = this.; 015 // for (; em.hasNext();) { 016 // Edge e = em.next().getEdgeReference(); 017 // Vertex v2 = e.v2; 018 // if (!v2.model.getMark()) { 019 // nextLevel.add(v2); 020 // v2.model.setMark(true); 021 // } 022 // } 023 // } 024 // maxLevel++; 025 // if (nextLevel.size() != 0) { 026 // return BFS( nextLevel, maxLevel); 027 // } else { 028 // return maxLevel; 029 // } 030 // } 031 }