private Set(Set set, IEnumerable<Column> newcolumns) { int incsize = newcolumns.Count(); this.columns = set.columns.Union(newcolumns).ToArray(); this.positions = set.positions; this.tuples = set.tuples.Select(t => t.AddColumns(incsize)).ToList(); }
public Set AddTuple(NameValues values) { Set set = new Set(this); Tuple tuple = new Tuple(this.columns.Length); foreach (string name in values.Values.Keys) tuple[this.positions[name]] = values.Values[name]; set.tuples.Add(tuple); return set; }
private Set(Set set) { this.columns = set.columns; this.positions = set.positions; this.tuples = new List<Tuple>(set.tuples); }