public Cursor(ZipDataView parent, DataViewRowCursor[] srcCursors, Func <int, bool> predicate)
                : base(parent._host)
            {
                Ch.AssertNonEmpty(srcCursors);
                Ch.AssertValue(predicate);

                _cursors        = srcCursors;
                _zipBinding     = parent._zipBinding;
                _isColumnActive = Utils.BuildArray(_zipBinding.ColumnCount, predicate);
            }
示例#2
0
            public Cursor(ZipDataView parent, RowCursor[] srcCursors, Func <int, bool> predicate)
                : base(parent._host)
            {
                Ch.AssertNonEmpty(srcCursors);
                Ch.AssertValue(predicate);

                _cursors         = srcCursors;
                _compositeSchema = parent._compositeSchema;
                _isColumnActive  = Utils.BuildArray(_compositeSchema.ColumnCount, predicate);
            }
 /// <summary>
 /// Create a new data view which is obtained by appending all columns of all the source data views.
 /// If the data views are of different length, the resulting data view will have the length equal to the
 /// length of the shortest source.
 /// </summary>
 /// <param name="env">The host environment to use.</param>
 /// <param name="sources">A non-empty collection of data views to zip together.</param>
 /// <returns>The resulting data view.</returns>
 public static IDataView Zip(this IHostEnvironment env, IEnumerable <IDataView> sources)
 {
     Contracts.CheckValue(env, nameof(env));
     env.CheckValue(sources, nameof(sources));
     return(ZipDataView.Create(env, sources));
 }