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; } }
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); }
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); }
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); }
public DomainList() { head = null; }
public DomainNode() { clsID = secID = Alias = null; domNext = null; //++count; }
public DomainNode toDom(string al) { DomainNode newNode = new DomainNode(CrsID, secID, al); return(newNode); }