intsupp

package module
v0.0.0-...-1959810 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(value int) int

func Div

func Div(vleft int, vright int) int

func Identity

func Identity(i int) int

func Max

func Max(vleft int, vright int) int

func Min

func Min(vleft int, vright int) int

func Minus

func Minus(vleft int, vright int) int

func Neg

func Neg(value int) int

func Plus

func Plus(vleft int, vright int) int

func Times

func Times(vleft int, vright int) int

Types

type Consumer

type Consumer func(value int)

type FluentPredicate

type FluentPredicate interface {
	Test(value int) bool
	Neg() FluentPredicate
	And(ps ...Predicate) FluentPredicate
	Or(ps ...Predicate) FluentPredicate
	Xor(p Predicate) FluentPredicate
	Pred() Predicate
}

func Fluent

func Fluent(p Predicate) FluentPredicate

type IndexedConsumer

type IndexedConsumer func(index int, value int)

type IndexedFunc

type IndexedFunc func(index int) int

func Constant

func Constant(constant int) IndexedFunc

-> f(i) = c

func Get

func Get(values []int) IndexedFunc

-> f(i) = values[i]

type IndexedOperator

type IndexedOperator func(index int, value int) int

type Operator

type Operator func(value int) int

func Mod

func Mod(value int) Operator

type Predicate

type Predicate func(value int) bool

/////////////////////////////////////////// plain predicates ///////////////////////////////////////////

func And

func And(ps ...Predicate) Predicate

func EQ

func EQ(value int) Predicate

-> p(val) = val == value

func GT

func GT(value int) Predicate

-> p(val) = val > value

func GTE

func GTE(value int) Predicate

-> p(val) = val >= value

func LT

func LT(value int) Predicate

-> p(val) = val < value

func LTE

func LTE(value int) Predicate

-> p(val) = val <= value

func Not

func Not(p Predicate) Predicate

-> p'(val) = !p(val)

func Or

func Or(ps ...Predicate) Predicate

func Xor

func Xor(l Predicate, r Predicate) Predicate

type ReduceOperator

type ReduceOperator func(vleft int, vright int) int

Jump to

Keyboard shortcuts

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