Share via


CustomMappingCatalog.FilterByStatefulCustomPredicate<TSrc,TState> Método

Definição

Remova linhas em que um predicado especificado retorna true. Esse filtro permite manter um estado por cursor.

public static Microsoft.ML.IDataView FilterByStatefulCustomPredicate<TSrc,TState> (this Microsoft.ML.DataOperationsCatalog catalog, Microsoft.ML.IDataView input, Func<TSrc,TState,bool> filterPredicate, Action<TState> stateInitAction) where TSrc : class, new() where TState : class, new();
static member FilterByStatefulCustomPredicate : Microsoft.ML.DataOperationsCatalog * Microsoft.ML.IDataView * Func<'Src, 'State, bool (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'State : null and 'State : (new : unit -> 'State))> * Action<'State (requires 'State : null and 'State : (new : unit -> 'State))> -> Microsoft.ML.IDataView (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'State : null and 'State : (new : unit -> 'State))
<Extension()>
Public Function FilterByStatefulCustomPredicate(Of TSrc As {Class, New}, TState As {Class, New}) (catalog As DataOperationsCatalog, input As IDataView, filterPredicate As Func(Of TSrc, TState, Boolean), stateInitAction As Action(Of TState)) As IDataView

Parâmetros de tipo

TSrc

A classe que define quais colunas serão retiradas dos dados de entrada.

TState

O tipo que descreve o estado por cursor.

Parâmetros

catalog
DataOperationsCatalog

O catálogo de operações de dados.

input
IDataView

Os dados de entrada.

filterPredicate
Func<TSrc,TState,Boolean>

Um predicado, que usa uma entrada de tipo TSrc e um objeto de estado do tipo TState, e retorna true se a linha deve ser filtrada (descartada) e false de outra forma.

stateInitAction
Action<TState>

A ação para inicializar o objeto de estado, que é chamado uma vez antes do cursor ser inicializado.

Retornos

Aplica-se a