Defines a delegate to implement a function.
Description
The DelegatedFunction class allows you to define a delegate to implement a function.
Constructors
NewDelegatedFunction
Constructs this function class with the specified parameters.
NewDelegatedFunction(name string, calculator FunctionCalculator) *DelegatedFunction
- name: string - name of this function.
- calculator: FunctionCalculator - function calculator delegate.
Fields
Methods
Calculate
Function’s calculation method.
(c *DelegatedFunction) Calculate(parameters []*Variant, variantOperations IVariantOperations) (*Variant, error)
- params: []*Variant - array with function parameters.
- variantOperations: IVariantOperations - variants operations manager.
- returns: (*Variant, error) - returned function’s result.