public void Init()
 {
     Country[] countries;
     countries = CountryParser.GetCountries(URL);
     USA       = countries[0];
     UK        = countries[9];
 }
        public void Init()
        {
            Country[] countries;
            countries = CountryParser.GetCountries(URL);

            BSTCountry = new CountryBSTree();
            countries.ToList().ForEach(c => BSTCountry.Create(c));
        }
        public void Init()
        {
            Country[] countries;
            countries = CountryParser.GetCountries(URL);

            USA    = countries[0];
            Canada = countries[1];
            UK     = countries[8];
            Russia = countries[12];
            China  = countries[18];

            BTCountry                           = new BinaryTree <string, Country>(USA.Name, USA);
            BTCountry.Root.Left                 = new Node <string, Country>(Canada.Name, Canada);
            BTCountry.Root.Left.Right           = new Node <string, Country>(UK.Name, UK);
            BTCountry.Root.Left.Right.Left      = new Node <string, Country>(Russia.Name, Russia);
            BTCountry.Root.Left.Right.Left.Left = new Node <string, Country>(China.Name, China);
        }
Exemplo n.º 4
0
        public void Init()
        {
            Country[] countries;
            countries = CountryParser.GetCountries(URL);

            USA    = countries[0];
            Canada = countries[1];
            UK     = countries[8];
            Russia = countries[12];
            China  = countries[18];

            AVLCountry = new AVLTree <string, Country>(USA.Name, USA);
            AVLCountry.Create(Canada.Name, Canada);
            AVLCountry.Create(UK.Name, UK);
            AVLCountry.Create(Russia.Name, Russia);
            AVLCountry.Create(China.Name, China);
        }
Exemplo n.º 5
0
 public void Init()
 {
     countries = CountryParser.GetCountries(URL);
 }