Data\DataViewUtils.cs (29)
87using (var cursor = view.GetRowCursor())
113public static bool TryCreateConsolidatingCursor(out DataViewRowCursor curs,
149public static DataViewRowCursor[] CreateSplitCursors(IChannelProvider provider, DataViewRowCursor input, int num)
155return new DataViewRowCursor[1] { input };
159return new DataViewRowCursor[1] { input };
222public static bool SameSchemaAndActivity(DataViewRowCursor[] cursors)
227var firstCursor = cursors[0];
256public static DataViewRowCursor ConsolidateGeneric(IChannelProvider provider, DataViewRowCursor[] inputs, int batchSize)
295private static readonly FuncInstanceMethodInfo1<Splitter, DataViewRowCursor, int, InPipe> _createInPipeMethodInfo
296= FuncInstanceMethodInfo1<Splitter, DataViewRowCursor, int, InPipe>.Create(target => target.CreateInPipe<int>);
321public static DataViewRowCursor Consolidate(IChannelProvider provider, DataViewRowCursor[] inputs, int batchSize, ref object[] ourPools)
330private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, DataViewRowCursor[] inputs, ref object[] ourPools, IChannel ch)
337DataViewRowCursor cursor = inputs[0];
372var localCursor = inputs[t];
496public static DataViewRowCursor[] Split(IChannelProvider provider, DataViewSchema schema, DataViewRowCursor input, int cthd)
508private DataViewRowCursor[] SplitCore(IChannelProvider ch, DataViewRowCursor input, int cthd)
1148private readonly DataViewRowCursor[] _cursors;
1161private DataViewRowCursor _currentCursor;
1182public SynchronousConsolidatingCursor(IChannelProvider provider, DataViewRowCursor[] cursors)
1205DataViewRowCursor cursor = _cursors[i];
1222foreach (var cursor in _cursors)
1253var cursor = _cursors[i];
1328public static ValueGetter<ReadOnlyMemory<char>>[] PopulateGetterArray(DataViewRowCursor cursor, List<int> colIndices)
DataLoadSave\Text\TextLoaderCursor.cs (5)
138public static DataViewRowCursor Create(TextLoader parent, IMultiStreamSource files, bool[] active)
155public static DataViewRowCursor[] CreateSet(TextLoader parent, IMultiStreamSource files, bool[] active, int n)
170return new DataViewRowCursor[1] { new Cursor(parent, stats, active, reader, srcNeeded, 1) };
172var cursors = new DataViewRowCursor[cthd];
185foreach (var curs in cursors)
DataLoadSave\Text\TextSaver.cs (5)
60public static ValueWriter Create(DataViewRowCursor cursor, int col, char sep)
161public VecValueWriter(DataViewRowCursor cursor, VectorDataViewType type, int source, char sep)
226public ValueWriter(DataViewRowCursor cursor, PrimitiveDataViewType type, int source, char sep)
428using (var cursor = data.GetRowCursor(activeCols))
576public void Run(DataViewRowCursor cursor, ref long count, out int minLen, out int maxLen)
DataView\BatchDataViewMapperBase.cs (12)
30public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
44var inputCursor = _source.GetRowCursor(_source.Schema.Where(c => activeInput[c.Index]), null);
58public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
64protected abstract TBatch CreateBatch(DataViewRowCursor input);
67protected abstract Func<bool> GetLastInBatchDelegate(DataViewRowCursor lookAheadCursor);
68protected abstract Func<bool> GetIsNewBatchDelegate(DataViewRowCursor lookAheadCursor);
69protected abstract ValueGetter<TInput> GetLookAheadGetter(DataViewRowCursor lookAheadCursor);
70protected abstract Delegate[] CreateGetters(DataViewRowCursor input, TBatch currentBatch, bool[] active);
76private readonly DataViewRowCursor _lookAheadCursor;
77private readonly DataViewRowCursor _input;
92public Cursor(BatchDataViewMapperBase<TInput, TBatch> parent, DataViewRowCursor input, DataViewRowCursor lookAheadCursor, bool[] active)
DataView\CacheDataView.cs (16)
209public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
243private DataViewRowCursor GetRowCursorWaiterCore<TWaiter>(TWaiter waiter, Func<int, bool> predicate, Random rand)
255public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
264return new DataViewRowCursor[] { GetRowCursor(columnsNeeded, rand) };
272private DataViewRowCursor[] GetRowCursorSetWaiterCore<TWaiter>(TWaiter waiter, Func<int, bool> predicate, int n, Random rand)
280DataViewRowCursor[] cursors = new DataViewRowCursor[n];
293private DataViewRowCursor CreateCursor<TIndex>(Func<int, bool> predicate, TIndex index)
332DataViewRowCursor cursor;
382private void Filler(DataViewRowCursor cursor, ColumnCache[] caches, OrderedWaiter waiter)
739/// (This in constrast to public <see cref="DataViewRowCursor"/> objects, whose move methods are
1279public static ColumnCache Create(CacheDataView parent, DataViewRowCursor input, int srcCol, OrderedWaiter waiter)
1299new Type[] { typeof(CacheDataView), typeof(DataViewRowCursor), typeof(int), typeof(OrderedWaiter) }, null);
1347public ImplVec(CacheDataView parent, DataViewRowCursor input, int srcCol, OrderedWaiter waiter)
1430public ImplOne(CacheDataView parent, DataViewRowCursor input, int srcCol, OrderedWaiter waiter)
1465public ColumnCache(CacheDataView parent, DataViewRowCursor input, int srcCol, OrderedWaiter waiter)
DataView\Transposer.cs (18)
287public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
290public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
384using (var cursor = _view.GetRowCursor(currentColumn))
536using (var cursor = _view.GetRowCursor(currentColumn))
831public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
842public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
1269public Cursor(IChannelProvider provider, DataViewSlicer slicer, DataViewRowCursor input, Func<int, bool> pred, bool[] activeSplitters)
1330private static readonly FuncStaticMethodInfo1<IChannelProvider, SlotCursor, DataViewRowCursor> _getRowCursorShimCoreMethodInfo
1331= new FuncStaticMethodInfo1<IChannelProvider, SlotCursor, DataViewRowCursor>(GetRowCursorShimCore<int>);
1386/// to handle <see cref="DataViewRowCursor"/> and <see cref="DataViewRow"/> but that know nothing about
1394public static DataViewRowCursor GetRowCursorShim(IChannelProvider provider, SlotCursor cursor)
1402private static DataViewRowCursor GetRowCursorShimCore<T>(IChannelProvider provider, SlotCursor cursor)
1412private static readonly FuncInstanceMethodInfo1<SlotDataView, bool, DataViewRowCursor> _getRowCursorMethodInfo
1413= FuncInstanceMethodInfo1<SlotDataView, bool, DataViewRowCursor>.Create(target => target.GetRowCursor<int>);
1449public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
1455private DataViewRowCursor GetRowCursor<T>(bool active)
1460public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
1462return new DataViewRowCursor[] { GetRowCursor(columnsNeeded, rand) };
Training\TrainerUtils.cs (17)
248public static DataViewRowCursor CreateRowCursor(this RoleMappedData data, CursOpt opt, Random rand, IEnumerable<int> extraCols = null)
255public static DataViewRowCursor[] CreateRowCursorSet(this RoleMappedData data,
481/// "convenience" cursor-like objects, less general than a <see cref="DataViewRowCursor"/> but
495private readonly DataViewRowCursor _cursor;
506protected TrainingCursorBase(DataViewRowCursor input, Action<CursOpt> signal)
514protected static DataViewRowCursor CreateCursor(RoleMappedData data, CursOpt opt, Random rand, params int[] extraCols)
568/// <see cref="DataViewRowCursor"/> directly. That is, this is only for very advanced scenarios.
629var input = _data.CreateRowCursor(opt, rand, extraCols);
680protected abstract TCurs CreateCursorCore(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal);
741protected StandardScalarCursor(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal = null)
806protected override StandardScalarCursor CreateCursorCore(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal)
831protected FeatureFloatVectorCursor(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal = null)
872protected override FeatureFloatVectorCursor CreateCursorCore(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal)
898protected FloatLabelCursor(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal = null)
938protected override FloatLabelCursor CreateCursorCore(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal)
967protected MulticlassLabelCursor(int classCount, DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal = null)
1016protected override MulticlassLabelCursor CreateCursorCore(DataViewRowCursor input, RoleMappedData data, CursOpt opt, Action<CursOpt> signal)
Transforms\NormalizeColumn.cs (13)
967int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
980int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1004int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1018int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1044int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1057int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1084int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1098int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1124int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1151string labelColumn, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1158int labelColumnId, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1196int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
1211int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
Transforms\Normalizer.cs (8)
144internal abstract IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor);
187internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
205internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
223internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
239internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
263internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
283internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
564using (var cursor = data.GetRowCursor(activeCols))
Transforms\PerGroupTransformBase.cs (9)
157public DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
160return new DataViewRowCursor[] { GetRowCursor(columnsNeeded, rand) };
163public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
177var inputCursor = Source.GetRowCursor(activeCols, null);
183private DataViewRowCursor GetRowCursorCore(Func<int, bool> predicate)
233private readonly DataViewRowCursor _groupCursor;
234private readonly DataViewRowCursor _input;
249public Cursor(PerGroupTransformBase<TLabel, TScore, TState> parent, DataViewRowCursor input, DataViewRowCursor groupCursor, bool[] active)
Transforms\RangeFilter.cs (17)
208protected override DataViewRowCursor GetRowCursorCore(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
216var input = Source.GetRowCursor(inputCols, rand);
220public override DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
233var cursors = new DataViewRowCursor[inputs.Length];
239private DataViewRowCursor CreateCursorCore(DataViewRowCursor input, bool[] active)
274protected RowCursorBase(RangeFilter parent, DataViewRowCursor input, bool[] active)
333public static DataViewRowCursor CreateKeyRowCursor(RangeFilter filter, DataViewRowCursor input, bool[] active)
336Func<RangeFilter, DataViewRowCursor, bool[], DataViewRowCursor> del = CreateKeyRowCursor<int>;
338return (DataViewRowCursor)methodInfo.Invoke(null, new object[] { filter, input, active });
341private static DataViewRowCursor CreateKeyRowCursor<TSrc>(RangeFilter filter, DataViewRowCursor input, bool[] active)
354public SingleRowCursor(RangeFilter parent, DataViewRowCursor input, bool[] active)
387public DoubleRowCursor(RangeFilter parent, DataViewRowCursor input, bool[] active)
422public KeyRowCursor(RangeFilter parent, DataViewRowCursor input, bool[] active)
Transforms\RowShufflingTransformer.cs (8)
225public static DataViewRowCursor GetShuffledCursor(IChannelProvider provider, int poolRows, DataViewRowCursor cursor, Random rand)
251protected override DataViewRowCursor GetRowCursorCore(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
281var input = _subsetInput.GetRowCursor(columnsNeeded, sourceRand);
290public override DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
293return new DataViewRowCursor[] { GetRowCursorCore(columnsNeeded, rand) };
466private readonly DataViewRowCursor _input;
502public Cursor(IChannelProvider provider, int poolRows, DataViewRowCursor input, Random rand)
Transforms\TransformBase.cs (10)
65public DataViewRowCursor GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
78DataViewRowCursor curs;
99protected abstract DataViewRowCursor GetRowCursorCore(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null);
101public abstract DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null);
261/// a <see cref="DataViewSchema"/> or a <see cref="DataViewRowCursor"/>,
734protected override DataViewRowCursor GetRowCursorCore(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand = null)
742var input = Source.GetRowCursor(inputCols, rand);
746public sealed override DataViewRowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand = null)
760var cursors = new DataViewRowCursor[inputs.Length];
853public Cursor(IChannelProvider provider, OneToOneTransformBase parent, DataViewRowCursor input, bool[] active)