pub trait Func<N: Num> {
// Required method
fn eval(&self, args: &[Term<N>], ctx: &Context<N>) -> Calculation<N>;
}Expand description
Implemented by functions defined in a context
Required Methods§
Sourcefn eval(&self, args: &[Term<N>], ctx: &Context<N>) -> Calculation<N>
fn eval(&self, args: &[Term<N>], ctx: &Context<N>) -> Calculation<N>
Evaluate the function in this context with the given arguments. When implementing,
simply evaluate the arguments with the context and return an Err(MathError::IncorrectArguments)
if there are too many or too few.