Ejemplo n.º 1
0
        public List <Otel> PuanliIlIlceVeriAl(string ilIsmi, string ilceIsmi)
        {
            List <Otel> tempOteller = new List <Otel>();
            List <Otel> oteller     = new List <Otel>();

            oteller = VeriAl(ilIsmi);


            for (int i = 0; i < oteller.Count; i++)
            {
                if (oteller[i].ilce == ilceIsmi)
                {
                    tempOteller.Add(oteller[i]);
                }
            }

            PuanliHeap puanliHeap = new PuanliHeap(oteller.Count);

            for (int i = 0; i < oteller.Count; i++)
            {
                puanliHeap.Insert(oteller[i]);
            }

            return(puanliHeap.SiraliVeriAl());
        }
Ejemplo n.º 2
0
        public List <Otel> PuanliIlVeriAl(string ilIsmi)
        {
            int         hash    = GetKeyValue(ilIsmi);
            List <Otel> oteller = new List <Otel>();

            if (tablo[hash] == null)
            {
                return(null);
            }
            else
            {
                LinkedHashEntry entry = tablo[hash];

                while (entry != null)
                {
                    oteller.Add(entry.otelBilgileri);
                    entry = entry.sonraki;
                }
            }

            PuanliHeap puanliHeap = new PuanliHeap(oteller.Count);

            for (int i = 0; i < oteller.Count; i++)
            {
                puanliHeap.Insert(oteller[i]);
            }

            return(puanliHeap.SiraliVeriAl());
        }