Documentation ¶
Index ¶
- Variables
- func B(op Binary) func(a, b Meta) Meta
- func Panic(a *V) bool
- func U(op Unary) func(a Meta) Meta
- type Binary
- type Context
- func (context *Context) Add(k Continuation, a, b *V) bool
- func (context *Context) Cos(k Continuation, a *V) bool
- func (context *Context) Div(k Continuation, a, b *V) bool
- func (context *Context) Exp(k Continuation, a *V) bool
- func (context *Context) Log(k Continuation, a *V) bool
- func (context *Context) Mul(k Continuation, a, b *V) bool
- func (context *Context) Sigmoid(k Continuation, a *V) bool
- func (context *Context) Sin(k Continuation, a *V) bool
- func (context *Context) Sub(k Continuation, a, b *V) bool
- func (context *Context) TanH(k Continuation, a *V) bool
- type Continuation
- type Meta
- type Unary
- type V
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Static is the static context Static Context // Add adds two numbers Add = B(Static.Add) // Sub subtracts two numbers Sub = B(Static.Sub) // Mul multiplies two numbers Mul = B(Static.Mul) // Div divides two numbers Div = B(Static.Div) // Sin the sine of a number Sin = U(Static.Sin) // Cos the cosine of a number Cos = U(Static.Cos) // Exp the base e exponential Exp = U(Static.Exp) // Log the natural logarithm Log = U(Static.Log) // Sigmoid the sigmoid of a number Sigmoid = U(Static.Sigmoid) //TanH the hyperbolic tangent of a number TanH = U(Static.TanH) )
Functions ¶
Types ¶
type Context ¶
type Context struct { }
Context is a function context
func (*Context) Add ¶
func (context *Context) Add(k Continuation, a, b *V) bool
Add adds two numbers
func (*Context) Cos ¶
func (context *Context) Cos(k Continuation, a *V) bool
Cos the cosine of a number
func (*Context) Div ¶
func (context *Context) Div(k Continuation, a, b *V) bool
Div divides two numbers
func (*Context) Exp ¶
func (context *Context) Exp(k Continuation, a *V) bool
Exp the base e exponential
func (*Context) Log ¶
func (context *Context) Log(k Continuation, a *V) bool
Log the natural logarithm
func (*Context) Mul ¶
func (context *Context) Mul(k Continuation, a, b *V) bool
Mul multiplies two numbers
func (*Context) Sigmoid ¶
func (context *Context) Sigmoid(k Continuation, a *V) bool
Sigmoid the sigmoid of a number
func (*Context) Sin ¶
func (context *Context) Sin(k Continuation, a *V) bool
Sin the sine of a number
type Meta ¶
type Meta func(k Continuation) Continuation
Meta is a function that takes a continuation and return a continuation
Click to show internal directories.
Click to hide internal directories.