Пример #1
0
        public void addToList(ref List <DomainNode> list)
        {// to add items in list to be returned for making new slot
            DomainNode temp = head;

            while (temp != null)
            {
                list.Add(temp.Clone());
                temp = temp.domNext;
            }
        }
Пример #2
0
        public bool isCrsPresent(string cID, string sID)
        {// to see if an item is present in domain
            DomainNode temp = head;

            while (temp != null)
            {
                if ((temp.clsID == cID) && (temp.secID == sID))
                {
                    return(true);
                }

                temp = temp.domNext;
            }
            return(false);
        }
Пример #3
0
        public List <DomainNode> getAscDomain()
        {
            var list = from element in table
                       orderby element.head.remClass ascending
                       select element.head;

            CourseHash        cHash = new CourseHash(1);
            List <DomainNode> dList = new List <DomainNode>();

            foreach (HashNode <T> hN in list)
            {
                DomainNode dN = new DomainNode(hN.crsID, hN.secID, cHash.getSecAls(hN.crsID, hN.secID));
                dList.Add(dN);
            }
            return(dList);
        }
Пример #4
0
        public List <DomainNode> getMinClashHeads()
        {
            var clashes = from element in Set
                          orderby element.count ascending
                          select element.head;

            CourseHash        cHash = new CourseHash(1);
            List <DomainNode> dList = new List <DomainNode>();

            foreach (Clash c in clashes)
            {
                DomainNode dNode = new DomainNode(c.CrsID, c.secID, cHash.getSecAls(c.CrsID, c.secID));
                dList.Add(dNode);
            }
            //List<Clash> list = new List<Clash>(clashes.ToArray());
            return(dList);
        }
Пример #5
0
 public DomainList()
 {
     head = null;
 }
Пример #6
0
 public DomainNode()
 {
     clsID   = secID = Alias = null;
     domNext = null;
     //++count;
 }
Пример #7
0
        public DomainNode toDom(string al)
        {
            DomainNode newNode = new DomainNode(CrsID, secID, al);

            return(newNode);
        }