Module func_impl

Module func_impl 

Source

Structs§

AddOperator
BinaryArrayOperator for vector addition.
BinaryFuncImpl
Wrapper around a BinaryArrayOperator to conveniently lift it to a FuncImpl given the TypeId of the argument/return type.
ComposeImpl
Implementation of a “function composition” FuncImpl
ConstImpl
Implementation of the constant function for the given “return” and “ignored” types. The result is of type return -> ignored -> return.
FillImpl
Implementation of a “Fill a vector with the given scalar” FuncImpl for the given scalar and vector TypeIds.
HeadImpl
Implementation of a “get the first element of a vector” FuncImpl for the given vector and scalar types.
MapImpl
Implementation of a “map this scalar function over every element of a vector” FuncImpl for the given scalar type, scalar function type, and vector type.
MulOperator
BinaryArrayOperator for elementwise vector multiplication.
ReduceImpl
Implementation of a “reduce this vector by this binary operator to yield a scalar” FuncImpl for the given TypeIds of the binary scalar operator, the scalar type, and the vector type.
RotateImpl
Implementation of a “rotate left one index” FuncImpl for a given vector TypeId. (That is, given [x_1, x_2, ...], rotates to [x_2, x_2, ... x_1].
SetHeadImpl
Implementation of a “set the first element of a vector to the given one” FuncImpl for the given vector and scalar types.
SubOperator
BinaryArrayOperator for vector subtraction.

Traits§

BinaryArrayOperator
Trait to ease implementation of primitive binary operators which have identical argument types and return type. To be used in tandem with BinaryFuncImpl.
FuncImpl
Trait for primitive function implementations.
HasFuncSignature
Trait which gives a “signature” for functions to be included in a crate::primitive_directory::PrimitiveDirectory. This consists of a name, a collection of required argument types, and a return type. Primitive functions are assumed to be uniquely identifiable from their particular implementation of this trait.