public Faceting1D(Func <T, TKey> selector, bool freeX, bool freeY, int?nrows, int?ncolumns, IEnumerable <TKey> predefinedFacets = null) : base(freeX, freeY) { this.selector = selector; this.nrows = nrows; this.ncolumns = ncolumns; this.predefinedFacets = predefinedFacets; if (predefinedFacets != null) { buffer.Add(predefinedFacets); } }
public Faceting2D(Func <T, TRow> row, Func <T, TColumn> column, bool freeX, bool freeY, IEnumerable <TRow> predefiniedRows = null, IEnumerable <TColumn> predefiniedColumns = null) : base(freeX, freeY) { this.row = row; this.column = column; this.predefiniedRows = predefiniedRows; if (predefiniedRows != null) { rows.Add(predefiniedRows); } this.predefiniedColumns = predefiniedColumns; if (predefiniedColumns != null) { columns.Add(predefiniedColumns); } }
public override void Train(T item) { rows.Add(row(item)); columns.Add(column(item)); }
internal NodeSequence Union(ProcessingContext context, NodeSequence otherSeq) { NodeSequence sequence = context.CreateSequence(); SortedBuffer<QueryNode, QueryNodeComparer> buffer = new SortedBuffer<QueryNode, QueryNodeComparer>(staticQueryNodeComparerInstance); for (int i = 0; i < this.count; i++) { buffer.Add(this.items[i].Node); } for (int j = 0; j < otherSeq.count; j++) { buffer.Add(otherSeq.items[j].Node); } for (int k = 0; k < buffer.Count; k++) { sequence.Add(buffer[k]); } sequence.RenumberItems(); return sequence; }
public override void Train(T item) => buffer.Add(selector(item));