IsFloat

package
v0.0.0-...-5012a73 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const CAP = 10

CAP is the capacity of the buffered proxy channel

View Source
const Float32CAP = 10

Float32CAP is the capacity of the buffered proxy channel

View Source
const Float32QUE = 16

Float32QUE is the allocated size of the circular queue

View Source
const QUE = 16

QUE is the allocated size of the circular queue

Variables

This section is empty.

Functions

func Chan

func Chan(inp ...float64) chan float64

Chan returns a channel to receive all inputs before close.

func ChanFloat32

func ChanFloat32(inp ...float32) chan float32

ChanFloat32 returns a channel to receive all inputs before close.

func ChanFloat32FuncErr

func ChanFloat32FuncErr(act func() (float32, error)) <-chan float32

ChanFloat32FuncErr returns a channel to receive all results of act until err != nil before close.

func ChanFloat32FuncNok

func ChanFloat32FuncNok(act func() (float32, bool)) <-chan float32

ChanFloat32FuncNok returns a channel to receive all results of act until nok before close.

func ChanFloat32Slice

func ChanFloat32Slice(inp ...[]float32) chan float32

ChanFloat32Slice returns a channel to receive all inputs before close.

func ChanFuncErr

func ChanFuncErr(act func() (float64, error)) <-chan float64

ChanFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanFuncNok

func ChanFuncNok(act func() (float64, bool)) <-chan float64

ChanFuncNok returns a channel to receive all results of act until nok before close.

func ChanSlice

func ChanSlice(inp ...[]float64) chan float64

ChanSlice returns a channel to receive all inputs before close.

func Daisy

func Daisy(inp <-chan float64, tube Tube) (out <-chan float64)

Daisy returns a channel to receive all inp after having passed thru tube.

func DaisyChain

func DaisyChain(inp <-chan float64, tubes ...Tube) (out <-chan float64)

DaisyChain returns a channel to receive all inp after having passed thru all tubes.

func Done

func Done(inp <-chan float64) chan struct{}

Done returns a channel to receive one signal before close after inp has been drained.

func DoneFloat32

func DoneFloat32(inp <-chan float32) chan struct{}

DoneFloat32 returns a channel to receive one signal before close after inp has been drained.

func DoneFloat32Func

func DoneFloat32Func(inp <-chan float32, act func(a float32)) chan struct{}

DoneFloat32Func returns a channel to receive one signal before close after act has been applied to all inp.

func DoneFloat32Slice

func DoneFloat32Slice(inp <-chan float32) chan []float32

DoneFloat32Slice returns a channel which will receive a slice of all the Float32s received on inp channel before close. Unlike DoneFloat32, a full slice is sent once, not just an event.

func DoneFunc

func DoneFunc(inp <-chan float64, act func(a float64)) chan struct{}

DoneFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneSlice

func DoneSlice(inp <-chan float64) chan []float64

DoneSlice returns a channel which will receive a slice of all the s received on inp channel before close. Unlike Done, a full slice is sent once, not just an event.

func Float32Daisy

func Float32Daisy(inp <-chan float32, tube Float32Tube) (out <-chan float32)

Float32Daisy returns a channel to receive all inp after having passed thru tube.

func Float32DaisyChain

func Float32DaisyChain(inp <-chan float32, tubes ...Float32Tube) (out <-chan float32)

Float32DaisyChain returns a channel to receive all inp after having passed thru all tubes.

func Join

func Join(out chan<- float64, inp ...float64) chan struct{}

Join sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinChan

func JoinChan(out chan<- float64, inp <-chan float64) chan struct{}

JoinChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinFloat32

func JoinFloat32(out chan<- float32, inp ...float32) chan struct{}

JoinFloat32 sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinFloat32Chan

func JoinFloat32Chan(out chan<- float32, inp <-chan float32) chan struct{}

JoinFloat32Chan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinFloat32Slice

func JoinFloat32Slice(out chan<- float32, inp ...[]float32) chan struct{}

JoinFloat32Slice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinSlice

func JoinSlice(out chan<- float64, inp ...[]float64) chan struct{}

JoinSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func MakeChan

func MakeChan() chan float64

MakeChan returns a new open channel (simply a 'chan float64' that is).

Note: No '-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myPipelineStartsHere := MakeChan()
// ... lot's of code to design and build Your favourite "myWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myPipelineStartsHere <- drop
}
close(myPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeBuffer) the channel is unbuffered.

func MakeFloat32Chan

func MakeFloat32Chan() chan float32

MakeFloat32Chan returns a new open channel (simply a 'chan float32' that is).

Note: No 'Float32-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myFloat32PipelineStartsHere := MakeFloat32Chan()
// ... lot's of code to design and build Your favourite "myFloat32WorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myFloat32PipelineStartsHere <- drop
}
close(myFloat32PipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeFloat32Buffer) the channel is unbuffered.

func Merge

func Merge(inps ...<-chan float64) (out <-chan float64)

Merge returns a channel to receive all inputs sorted and free of duplicates. Each input channel needs to be ascending; sorted and free of duplicates.

Note: If no inputs are given, a closed channel is returned.

func MergeFloat32

func MergeFloat32(inps ...<-chan float32) (out <-chan float32)

MergeFloat32 returns a channel to receive all inputs sorted and free of duplicates. Each input channel needs to be ascending; sorted and free of duplicates.

Note: If no inputs are given, a closed Float32channel is returned.

func PipeBuffer

func PipeBuffer(inp <-chan float64, cap int) chan float64

PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeFloat32Buffer

func PipeFloat32Buffer(inp <-chan float32, cap int) chan float32

PipeFloat32Buffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeFloat32Fork

func PipeFloat32Fork(inp <-chan float32) (chan float32, chan float32)

PipeFloat32Fork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeFloat32Func

func PipeFloat32Func(inp <-chan float32, act func(a float32) float32) chan float32

PipeFloat32Func returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeFloat32Map for functional people, but 'map' has a very different meaning in go lang.

func PipeFork

func PipeFork(inp <-chan float64) (chan float64, chan float64)

PipeFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeFunc

func PipeFunc(inp <-chan float64, act func(a float64) float64) chan float64

PipeFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeMap for functional people, but 'map' has a very different meaning in go lang.

func SendProxy

func SendProxy(out chan<- float64) chan<- float64

SendProxy returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyFloat32

func SendProxyFloat32(out chan<- float32) chan<- float32

SendProxyFloat32 returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

Types

type BasicInfo

type BasicInfo int

BasicInfo is a set of flags describing properties of a basic type.

const (
	IsBoolean BasicInfo = 1 << iota
	IsInteger
	IsUnsigned
	IsFloat
	IsComplex
	IsString
	IsUntyped

	IsOrdered   = IsInteger | IsFloat | IsString
	IsNumeric   = IsInteger | IsFloat | IsComplex
	IsConstType = IsBoolean | IsNumeric | IsString
)

Properties of basic types.

type BasicKind

type BasicKind int

BasicKind describes the kind of basic type.

type Float32Tube

type Float32Tube func(inp <-chan float32, out <-chan float32)

Float32Tube is the signature for a pipe function.

type Tube

type Tube func(inp <-chan float64, out <-chan float64)

Tube is the signature for a pipe function.

Jump to

Keyboard shortcuts

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