/// <summary> /// Determines whether the specified object is equal to the current object. /// </summary> /// <param name="other">The object to compare with the current object.</param> /// <returns><c>true</c> if the specified object is equal to the current object; otherwise, <c>false</c>.</returns> public bool Equals(ROCollection <T> other) { if ((object)other == null) { return(false); } return(this.GetHashCode() == other.GetHashCode()); }
private HashSet <ROCollection <string> > ground( HashSet <ROCollection <string> > predvars, Dictionary <string, string> varvals) { /* * g = [ varvals[v] if v in varvals else v for v in self.predicate ] * return tuple(g) * set( [ a.ground( st ) for a in op.precondition_pos ] ) * */ var r = new List <ROCollection <string> >(); foreach (var p in predvars) { var l = new List <string>(); foreach (var v in p) { l.Add(varvals.ContainsKey(v) ? varvals[v] : v); } var pg = new ROCollection <string>(l); r.Add(pg); } return(new HashSet <ROCollection <string> >(r)); }