Ejemplo n.º 1
0
        public IList<BatteryStation> GetAdjacencies(BatteryStation station)
        {
            IList<BatteryStation> adjStations = new List<BatteryStation>();
            IEnumerator ien = station.EdgeList().GetEnumerator();

            while (ien.MoveNext())
            {
                Edge e = (Edge)ien.Current;
                adjStations.Add(e.To);
            }

            return adjStations;
        }
Ejemplo n.º 2
0
        public Edge FindEdge(BatteryStation from, BatteryStation to)
        {
            Edge edge = null;

            foreach (Edge e in from.EdgeList())
            {
                if (e.To.Equals(to))
                    edge = e;
            }

            return edge;
        }