pub struct DdxAnalyzer { /* private fields */ }Expand description
The ddx analyzer rule: rewrites grad/jvp markers away before execution.
Install it with crate::install, which also registers the marker UDFs so
the calls parse in the first place.
Implementations§
Source§impl DdxAnalyzer
impl DdxAnalyzer
Sourcepub fn with_engine(ddx: Ddx) -> Self
pub fn with_engine(ddx: Ddx) -> Self
A rule driving a caller-supplied engine — use this to pick up custom
differentiation rules registered via Ddx::register.
Sourcepub fn with_engine_and_functions(
ddx: Ddx,
functions: impl IntoIterator<Item = Arc<ScalarUDF>>,
) -> Self
pub fn with_engine_and_functions( ddx: Ddx, functions: impl IntoIterator<Item = Arc<ScalarUDF>>, ) -> Self
As DdxAnalyzer::with_engine, plus extra scalar functions that may
appear in a re-planned derivative.
You rarely need this. A UDF from your own marker body is handled
automatically — it is harvested from the bound expression itself, so
grad(my_udf(y) * x, x) works with no setup regardless of when my_udf
was registered. What lands outside that is a UDF emitted by a custom
differentiation rule you registered with Ddx::register: that
function appears only in the output, so it cannot be harvested from the
input and must be declared here.
Trait Implementations§
Source§impl AnalyzerRule for DdxAnalyzer
impl AnalyzerRule for DdxAnalyzer
Source§fn analyze(
&self,
plan: LogicalPlan,
config: &ConfigOptions,
) -> Result<LogicalPlan>
fn analyze( &self, plan: LogicalPlan, config: &ConfigOptions, ) -> Result<LogicalPlan>
planSource§impl Debug for DdxAnalyzer
impl Debug for DdxAnalyzer
Auto Trait Implementations§
impl !RefUnwindSafe for DdxAnalyzer
impl !UnwindSafe for DdxAnalyzer
impl Freeze for DdxAnalyzer
impl Send for DdxAnalyzer
impl Sync for DdxAnalyzer
impl Unpin for DdxAnalyzer
impl UnsafeUnpin for DdxAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more