コード例 #1
0
        public void LoadData()
        {
            if (namesSrc == null)
            {
                throw new System.ArgumentException("NameSrc is uninitialized");
            }
            if (connectionsSrc == null)
            {
                throw new System.ArgumentException("ConnectionsSrc is uninitialized");
            }
            if (linesSrc == null)
            {
                throw new System.ArgumentException("LineSrc is uninitialized");
            }

            loadLinesData();
            loadStationsData();
            graph = new GraphAdjList(stations.Count);

            loadConnectionsData();
            bfs = new BreadthFirstSearch(graph);
        }
コード例 #2
0
 public BreadthFirstSearch(GraphAdjList G)
 {
     edgesTo = new Dictionary <ushort, List <ushort> >();
     distTo  = new Dictionary <ushort, int>();
     g       = G;
 }