selection

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package selection provides implementation of tfdata.Transformation

Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Example

type Example interface {
	// Return subset of keys to select from TFExample
	SelectExample(*core.TFExample) []string
}

type ExampleF

type ExampleF struct {
	// contains filtered or unexported fields
}

Applies f to each example and selects returned keys subset

func ByExampleF

func ByExampleF(f func(*core.TFExample) []string) *ExampleF

Select subset of Example's entries returned by a function

func (*ExampleF) SelectExample

func (s *ExampleF) SelectExample(ex *core.TFExample) []string

type Key

type Key struct {
	// contains filtered or unexported fields
}

Selects keys either equal to key, or having suffix, prefix or substring

func ByKey

func ByKey(key string) *Key

Select entries with given key

func ByPrefix

func ByPrefix(prefix string) *Key

Select entries with key having prefix

func BySubstring

func BySubstring(substring string) *Key

Select entries with key having substring

func BySuffix

func BySuffix(sufix string) *Key

Select entries with key having suffix

func (*Key) SelectExample

func (s *Key) SelectExample(ex *core.TFExample) []string

func (*Key) SelectSample

func (s *Key) SelectSample(sample *core.Sample) []string

type KeyValue

type KeyValue struct {
	// contains filtered or unexported fields
}

Selects entry if entries[key == value

func ByKeyValue

func ByKeyValue(key string, value interface{}) *KeyValue

Select subset of entries, where for given key value is matching

func (*KeyValue) SelectExample

func (s *KeyValue) SelectExample(example *core.TFExample) []string

func (*KeyValue) SelectSample

func (s *KeyValue) SelectSample(sample *core.Sample) []string

type Sample

type Sample interface {
	// Return subset of keys to select from Sample
	SelectSample(*core.Sample) []string
}

type SampleF

type SampleF struct {
	// contains filtered or unexported fields
}

Applies f to each sample and selects returned keys subset

func BySampleF

func BySampleF(f func(*core.Sample) []string) *SampleF

Select subset of Sample's entries returned by a function

func (*SampleF) SelectSample

func (s *SampleF) SelectSample(sample *core.Sample) []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL