Data\RowCursorUtils.cs (33)
19private static readonly FuncStaticMethodInfo1<DataViewRow, int, Delegate> _getGetterAsDelegateCoreMethodInfo
20= new FuncStaticMethodInfo1<DataViewRow, int, Delegate>(GetGetterAsDelegateCore<int>);
22private static readonly FuncStaticMethodInfo1<DataViewRow, int, Func<bool>> _getIsNewGroupDelegateCoreMethodInfo
23= new FuncStaticMethodInfo1<DataViewRow, int, Func<bool>>(GetIsNewGroupDelegateCore<int>);
33public static Delegate GetGetterAsDelegate(DataViewRow row, int col)
42private static Delegate GetGetterAsDelegateCore<TValue>(DataViewRow row, int col)
48/// Given a destination type, <see cref="DataViewRow"/>, and column index, return a ValueGetter for the column
53public static Delegate GetGetterAs(DataViewType typeDst, DataViewRow row, int col)
64Func<DataViewType, DataViewType, DataViewRow, int, ValueGetter<int>> del = GetGetterAsCore<int, int>;
70/// Given a destination type, <see cref="DataViewRow"/>, and column index, return a ValueGetter{TDst} for the column
73public static ValueGetter<TDst> GetGetterAs<TDst>(DataViewType typeDst, DataViewRow row, int col)
85Func<DataViewType, DataViewType, DataViewRow, int, ValueGetter<TDst>> del = GetGetterAsCore<int, TDst>;
90private static ValueGetter<TDst> GetGetterAsCore<TSrc, TDst>(DataViewType typeSrc, DataViewType typeDst, DataViewRow row, int col)
114/// Given a <see cref="DataViewRow"/>, and column index, return a function that utilizes the
121public static ValueGetter<StringBuilder> GetGetterAsStringBuilder(DataViewRow row, int col)
132private static ValueGetter<StringBuilder> GetGetterAsStringBuilderCore<TSrc>(DataViewType typeSrc, DataViewRow row, int col)
151/// <see cref="GetVecGetterAs{TDst}(PrimitiveDataViewType, DataViewRow, int)"/>.
153public static Delegate GetVecGetterAs(PrimitiveDataViewType typeDst, DataViewRow row, int col)
172public static ValueGetter<VBuffer<TDst>> GetVecGetterAs<TDst>(PrimitiveDataViewType typeDst, DataViewRow row, int col)
210public static GetterFactory Create(DataViewRow row, int col)
224private readonly DataViewRow _row;
227public RowImpl(DataViewRow row, int col)
304public static Func<bool> GetIsNewGroupDelegate(DataViewRow cursor, int col)
313private static Func<bool> GetIsNewGroupDelegateCore<T>(DataViewRow cursor, int col)
352public static ValueGetter<Single> GetLabelGetter(DataViewRow cursor, int labelIndex)
374private static ValueGetter<Single> GetLabelGetterNotFloat(DataViewRow cursor, int labelIndex)
453public static T Fetch<T>(IExceptionContext ectx, DataViewRow row, string name)
464/// wish to use some facility normally only exposed to dataviews. (For example, you have an <see cref="DataViewRow"/>
473public static IDataView RowAsDataView(IHostEnvironment env, DataViewRow row)
509private readonly DataViewRow _row;
515public OneRowDataView(IHostEnvironment env, DataViewRow row)
610/// <see cref="DataViewRow.GetIdGetter"/> or <see cref="DataViewRow.GetGetter{TValue}(DataViewSchema.Column)"/>.
DataDebuggerPreview.cs (3)
19private static readonly FuncInstanceMethodInfo1<DataDebuggerPreview, DataViewRow, int, Action<RowInfo, List<object>>> _makeSetterMethodInfo
20= FuncInstanceMethodInfo1<DataDebuggerPreview, DataViewRow, int, Action<RowInfo, List<object>>>.Create(target => target.MakeSetter<int>);
68private Action<RowInfo, List<object>> MakeSetter<T>(DataViewRow row, int col)
DataView\Transposer.cs (18)
892/// and then can be bound to an <see cref="DataViewRow"/> to provide that splitting functionality.
959/// Given an input <see cref="DataViewRow"/>, create the <see cref="DataViewRow"/> containing the split
962public abstract DataViewRow Bind(DataViewRow row, Func<int, bool> pred);
981public RowBase(TSplitter parent, DataViewRow input)
1022public override DataViewRow Bind(DataViewRow row, Func<int, bool> pred)
1035public RowImpl(NoSplitter<T> parent, DataViewRow input, bool isActive)
1116public override DataViewRow Bind(DataViewRow row, Func<int, bool> pred)
1140public RowImpl(ColumnSplitter<T> parent, DataViewRow input, Func<int, bool> pred)
1259/// The cursor implementation creates the <see cref="DataViewRow"/>s using <see cref="Splitter.Bind"/>,
1265private readonly DataViewRow[] _sliceRows;
1277_sliceRows = new DataViewRow[_slicer._splitters.Length];
1304var row = _sliceRows[splitInd];
1321var splitIndRow = _sliceRows[splitInd];
1386/// to handle <see cref="DataViewRowCursor"/> and <see cref="DataViewRow"/> but that know nothing about
DataView\TypedCursor.cs (11)
15/// This interface is an <see cref="DataViewRow"/> with 'strongly typed' binding.
167public IRowReadableAs<TRow> GetRow(DataViewRow input)
334public TypedRowBase(TypedCursorable<TRow> parent, DataViewRow input, string channelMessage)
356private Action<TRow> GenerateSetter(DataViewRow input, int index, InternalSchemaDefinition.Column column, Delegate poke, Delegate peek)
361Func<DataViewRow, int, Delegate, Delegate, Action<TRow>> del;
424private Action<TRow> CreateConvertingVBufferSetter<TSrc, TDst>(DataViewRow input, int col, Delegate poke, Delegate peek, Func<TSrc, TDst> convert)
446private Action<TRow> CreateDirectVBufferSetter<TDst>(DataViewRow input, int col, Delegate poke, Delegate peek)
484private static Action<TRow> CreateConvertingActionSetter<TSrc, TDst>(DataViewRow input, int col, Delegate poke, Func<TSrc, TDst> convert)
498private static Action<TRow> CreateDirectSetter<TDst>(DataViewRow input, int col, Delegate poke, Delegate peek)
513private Action<TRow> CreateVBufferToVBufferSetter<TDst>(DataViewRow input, int col, Delegate poke, Delegate peek)
554public TypedRow(TypedCursorable<TRow> parent, DataViewRow input)
Scorers\FeatureContributionCalculation.cs (10)
94private static readonly FuncInstanceMethodInfo1<BindableMapper, DataViewRow, int, Delegate> _getValueGetterMethodInfo
95= FuncInstanceMethodInfo1<BindableMapper, DataViewRow, int, Delegate>.Create(target => target.GetValueGetter<int>);
191public Delegate GetTextContributionGetter(DataViewRow input, int colSrc, VBuffer<ReadOnlyMemory<char>> slotNames)
197Func<DataViewRow, int, VBuffer<ReadOnlyMemory<char>>, ValueGetter<ReadOnlyMemory<char>>> del = GetTextValueGetter<int>;
202public Delegate GetContributionGetter(DataViewRow input, int colSrc)
223private ValueGetter<ReadOnlyMemory<char>> GetTextValueGetter<TSrc>(DataViewRow input, int colSrc, VBuffer<ReadOnlyMemory<char>> slotNames)
262private ValueGetter<VBuffer<float>> GetValueGetter<TSrc>(DataViewRow input, int colSrc)
364DataViewRow ISchemaBoundRowMapper.GetRow(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns)
378var genericRow = _genericRowMapper.GetRow(input, activeColumns);
Scorers\RowToRowScorerBase.cs (9)
22private static readonly FuncStaticMethodInfo1<DataViewRow, int, Delegate> _getGetterFromRowMethodInfo
23= new FuncStaticMethodInfo1<DataViewRow, int, Delegate>(GetGetterFromRow<int>);
165protected override Delegate[] CreateGetters(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns, out Action disp)
170var output = bindings.RowMapper.GetRow(input, activeMapperColumns);
188protected abstract Delegate[] GetGetters(DataViewRow output, Func<int, bool> predicate);
190protected static Delegate[] GetGettersFromRow(DataViewRow row, Func<int, bool> predicate)
204protected static Delegate GetGetterFromRow(DataViewRow row, int col)
214protected static ValueGetter<T> GetGetterFromRow<T>(DataViewRow output, int col)
233private readonly DataViewRow _output;
Scorers\SchemaBindablePredictorWrapper.cs (11)
37private static readonly FuncInstanceMethodInfo2<SchemaBindablePredictorWrapperBase, DataViewRow, int, Delegate> _getValueGetterMethodInfo
38= FuncInstanceMethodInfo2<SchemaBindablePredictorWrapperBase, DataViewRow, int, Delegate>.Create(target => target.GetValueGetter<int, int>);
157protected virtual Delegate GetPredictionGetter(DataViewRow input, int colSrc)
166private ValueGetter<TDst> GetValueGetter<TSrc, TDst>(DataViewRow input, int colSrc)
235DataViewRow ISchemaBoundRowMapper.GetRow(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns)
553private Delegate[] CreateGetters(DataViewRow input, bool[] active)
596ref float score, ref float prob, DataViewRow input)
609DataViewRow ISchemaBoundRowMapper.GetRow(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns)
698protected override Delegate GetPredictionGetter(DataViewRow input, int colSrc)
Transforms\ColumnConcatenatingTransformer.cs (8)
524private static readonly FuncInstanceMethodInfo1<BoundColumn, DataViewRow, Delegate> _makeIdentityGetterMethodInfo
525= FuncInstanceMethodInfo1<BoundColumn, DataViewRow, Delegate>.Create(target => target.MakeIdentityGetter<int>);
527private static readonly FuncInstanceMethodInfo1<BoundColumn, DataViewRow, Delegate> _makeGetterMethodInfo
528= FuncInstanceMethodInfo1<BoundColumn, DataViewRow, Delegate>.Create(target => target.MakeGetter<int>);
675public Delegate MakeGetter(DataViewRow input)
683private Delegate MakeIdentityGetter<T>(DataViewRow input)
689private Delegate MakeGetter<T>(DataViewRow input)
875protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\FeatureContributionCalculationTransformer.cs (4)
167private static readonly FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate> _getValueGetterMethodInfo
168= FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate>.Create(target => target.GetValueGetter<int>);
203protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> active, out Action disposer)
213private Delegate GetValueGetter<TSrc>(DataViewRow input, int colSrc)
Transforms\Hashing.cs (16)
261private Delegate GetGetterCore(DataViewRow input, int iinfo, out Action disposer)
350private ValueGetter<uint> ComposeGetterOne(DataViewRow input, int iinfo, int srcCol, DataViewType srcType)
402private ValueGetter<VBuffer<uint>> ComposeGetterVec(DataViewRow input, int iinfo, int srcCol, VectorDataViewType srcType)
449private ValueGetter<VBuffer<uint>> ComposeGetterVecCore<T, THash>(DataViewRow input, int iinfo, int srcCol, VectorDataViewType srcType)
464private ValueGetter<uint> ComposeGetterCombined(DataViewRow input, int iinfo, int srcCol, VectorDataViewType srcType)
997private static ValueGetter<uint> MakeScalarHashGetter<T, THash>(DataViewRow input, int srcCol, uint seed, uint mask, bool useOldHashing)
1279private static ValueGetter<uint> MakeCombinedVectorHashGetter<T, THash>(DataViewRow input, int srcCol, uint seed, uint mask)
1354protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer);
1481protected readonly DataViewRow Row;
1487private InvertHashHelper(DataViewRow row, HashingEstimator.ColumnOptions ex)
1508public static InvertHashHelper Create(DataViewRow row, HashingEstimator.ColumnOptions ex, int invertHashMaxCount, Delegate dstGetter)
1519var consTypes = new Type[] { typeof(DataViewRow), typeof(HashingEstimator.ColumnOptions), typeof(int), typeof(Delegate) };
1596protected Impl(DataViewRow row, HashingEstimator.ColumnOptions ex, int invertHashMaxCount)
1629public ImplOne(DataViewRow row, HashingEstimator.ColumnOptions ex, int invertHashMaxCount, Delegate dstGetter)
1663public ImplVec(DataViewRow row, HashingEstimator.ColumnOptions ex, int invertHashMaxCount, Delegate dstGetter)
1697public ImplVecOrdered(DataViewRow row, HashingEstimator.ColumnOptions ex, int invertHashMaxCount, Delegate dstGetter)
Transforms\NormalizeColumn.cs (7)
424public abstract Delegate GetGetter(DataViewRow input, int icol);
545public abstract Delegate GetGetter(DataViewRow input, int icol);
676public abstract Delegate GetGetter(DataViewRow input, int icol);
799protected SupervisedBinFunctionBuilderBase(IHost host, long lim, int labelColId, DataViewRow dataRow)
809private ValueGetter<int> GetLabelGetter(DataViewRow row, int col, out int labelCardinality)
883DataViewRow dataRow)
911protected VecColumnSupervisedBinFunctionBuilderBase(IHost host, long lim, int valueColId, int labelColId, DataViewRow dataRow)
Transforms\NormalizeColumnDbl.cs (10)
707public override Delegate GetGetter(DataViewRow input, int icol)
783public override Delegate GetGetter(DataViewRow input, int icol)
1025public override Delegate GetGetter(DataViewRow input, int icol)
1080public override Delegate GetGetter(DataViewRow input, int icol)
1209public override Delegate GetGetter(DataViewRow input, int icol)
1294public override Delegate GetGetter(DataViewRow input, int icol)
1980private SupervisedBinOneColumnFunctionBuilder(IHost host, long lim, bool fix, int numBins, int minBinSize, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2000public static IColumnFunctionBuilder Create(NormalizingEstimator.SupervisedBinningColumOptions column, IHost host, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2018private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, int numBins, int minBinSize, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2040public static IColumnFunctionBuilder Create(NormalizingEstimator.SupervisedBinningColumOptions column, IHost host, int valueColumnId, int labelColumnId, DataViewRow dataRow)
Transforms\NormalizeColumnSng.cs (10)
865public override Delegate GetGetter(DataViewRow input, int icol)
940public override Delegate GetGetter(DataViewRow input, int icol)
1185public override Delegate GetGetter(DataViewRow input, int icol)
1240public override Delegate GetGetter(DataViewRow input, int icol)
1370public override Delegate GetGetter(DataViewRow input, int icol)
1455public override Delegate GetGetter(DataViewRow input, int icol)
2144private SupervisedBinOneColumnFunctionBuilder(IHost host, long lim, bool fix, int numBins, int minBinSize, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2164public static IColumnFunctionBuilder Create(NormalizingEstimator.SupervisedBinningColumOptions column, IHost host, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2182private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, int numBins, int minBinSize, int valueColumnId, int labelColumnId, DataViewRow dataRow)
2204public static IColumnFunctionBuilder Create(NormalizingEstimator.SupervisedBinningColumOptions column, IHost host, int valueColumnId, int labelColumnId, DataViewRow dataRow)
Transforms\SlotsDroppingTransformer.cs (11)
454private static readonly FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate> _makeVecGetterMethodInfo
455= FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate>.Create(target => target.MakeVecGetter<int>);
457private static readonly FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate> _getSrcGetterMethodInfo
458= FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate>.Create(target => target.GetSrcGetter<int>);
719protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
738private Delegate MakeOneTrivialGetter(DataViewRow input, int iinfo)
759private Delegate MakeVecTrivialGetter(DataViewRow input, int iinfo)
780private Delegate MakeVecGetter(DataViewRow input, int iinfo)
790private ValueGetter<VBuffer<TDst>> MakeVecGetter<TDst>(DataViewRow input, int iinfo)
807private ValueGetter<T> GetSrcGetter<T>(DataViewRow input, int iinfo)
816private Delegate GetSrcGetter(DataViewType typeDst, DataViewRow row, int iinfo)
Transforms\TransformBase.cs (10)
176DataViewRow IRowToRowMapper.GetRow(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns)
189protected abstract Delegate[] CreateGetters(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns, out Action disp);
203public RowImpl(DataViewRow input, RowToRowMapperTransformBase parent, DataViewSchema schema, Delegate[] getters, Action disposer)
478private static readonly FuncInstanceMethodInfo1<OneToOneTransformBase, DataViewRow, int, Delegate> _getSrcGetterMethodInfo
479= FuncInstanceMethodInfo1<OneToOneTransformBase, DataViewRow, int, Delegate>.Create(target => target.GetSrcGetter<int>);
692protected abstract Delegate GetGetterCore(IChannel ch, DataViewRow input, int iinfo, out Action disposer);
694protected ValueGetter<T> GetSrcGetter<T>(DataViewRow input, int iinfo)
703protected Delegate GetSrcGetter(DataViewType typeDst, DataViewRow row, int iinfo)
818protected override Delegate[] CreateGetters(DataViewRow input, IEnumerable<DataViewSchema.Column> activeColumns, out Action disposer)
Transforms\ValueToKeyMappingTransformer.cs (4)
704private static readonly FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate> _makeGetterMethodInfo
705= FuncInstanceMethodInfo1<Mapper, DataViewRow, int, Delegate>.Create(target => target.MakeGetter<int>);
756protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
765private Delegate MakeGetter<T>(DataViewRow row, int src) => _termMap[src].GetMappingGetter(row);
Transforms\ValueToKeyMappingTransformerImpl.cs (5)
284public static Trainer Create(DataViewRow row, int col, bool autoConvert, int count, Builder bldr)
301private static Trainer CreateOne<T>(DataViewRow row, int col, bool autoConvert, int count, Builder bldr)
317private static Trainer CreateVec<T>(DataViewRow row, int col, int count, Builder bldr)
854public abstract Delegate GetMappingGetter(DataViewRow row);
895public override Delegate GetMappingGetter(DataViewRow input)