Exemple #1
0
 public static BLSorting GetInstance()
 {
     if (BLinstance == null)
     {
         BLinstance = new BLSorting();
     }
     return(BLinstance);
 }
Exemple #2
0
        public List <Nanny> FiveMostAppropriateNannies(List <Nanny> n, Mother m)
        {
            List <Nanny> t    = n;
            List <Nanny> Five = new List <Nanny>();
            List <KeyValuePair <Nanny, int> > temp = BLSorting.GetInstance().sortBySuitableDays(t, m);

            for (int i = 0; i < 5; i++)
            {
                if (i < temp.Count)
                {
                    Five.Add(temp[i].Key);
                }
            }
            return(Five);
        }
Exemple #3
0
        public List <Nanny> relevanceNannies(List <Nanny> NanList, Mother m)
        {
            List <Nanny> suitable = new List <Nanny>();
            List <Nanny> temp     = new List <Nanny>();

            temp = NanList;
            List <KeyValuePair <Nanny, int> > t = BLSorting.GetInstance().sortBySuitableDays(temp, m);
            int i = t.Count - 1;

            while (i > 0 && t[i].Value >= 0)
            {
                suitable.Add(t[i].Key);
                i--;
            }
            return(suitable);
        }