pub struct NumericCallable { /* private fields */ }Expand description
A numeric-method callable, either a Func value or any ordinary callable
runtime value with the variable symbols supplied by the numeric surface.
Implementations§
Source§impl NumericCallable
impl NumericCallable
Sourcepub fn unary(value: Value, var: Symbol) -> Result<Self>
pub fn unary(value: Value, var: Symbol) -> Result<Self>
Builds a unary callable whose Func parameter, when present, must match
the requested variable.
Sourcepub fn binary(value: Value, var: Symbol, y_var: Symbol) -> Result<Self>
pub fn binary(value: Value, var: Symbol, y_var: Symbol) -> Result<Self>
Builds a binary callable whose Func parameters, when present, must
match the requested independent and dependent variables.
Sourcepub fn sampled_unary(value: Value, fallback_var: Symbol) -> Result<Self>
pub fn sampled_unary(value: Value, fallback_var: Symbol) -> Result<Self>
Builds a unary sampling callable. Func values keep their own variable
name; ordinary callables use fallback_var.
Sourcepub fn sampled_binary(
value: Value,
fallback_var: Symbol,
fallback_y_var: Symbol,
) -> Result<Self>
pub fn sampled_binary( value: Value, fallback_var: Symbol, fallback_y_var: Symbol, ) -> Result<Self>
Builds a binary sampling callable. Func values keep their own variable
names; ordinary callables use the supplied fallback names.
Sourcepub fn call(&self, cx: &mut Cx, args: Vec<Value>) -> Result<Value>
pub fn call(&self, cx: &mut Cx, args: Vec<Value>) -> Result<Value>
Calls the wrapped value with numeric sample arguments.
Sourcepub fn body_cas(&self) -> Option<&CasExpr>
pub fn body_cas(&self) -> Option<&CasExpr>
The symbolic CAS body when the wrapped value is a symbolic Func.
Sourcepub fn differentiator_hint(&self) -> Option<&Symbol>
pub fn differentiator_hint(&self) -> Option<&Symbol>
The exact differentiator hint when the wrapped value is a hinted Func.
Trait Implementations§
Source§impl Clone for NumericCallable
impl Clone for NumericCallable
Source§fn clone(&self) -> NumericCallable
fn clone(&self) -> NumericCallable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more