pub trait ReduceNode {
// Required methods
fn as_any(&self) -> &dyn Any;
fn node_dtype(&self) -> VortexResult<DType>;
fn scalar_fn(&self) -> Option<&ScalarFn>;
fn child(&self, idx: usize) -> ReduceNodeRef;
fn child_count(&self) -> usize;
}Expand description
A node used for implementing abstract reduction rules.
Required Methods§
Sourcefn node_dtype(&self) -> VortexResult<DType>
fn node_dtype(&self) -> VortexResult<DType>
Return the data type of this node.
Sourcefn scalar_fn(&self) -> Option<&ScalarFn>
fn scalar_fn(&self) -> Option<&ScalarFn>
Return this node’s scalar function if it is indeed a scalar fn.
Sourcefn child(&self, idx: usize) -> ReduceNodeRef
fn child(&self, idx: usize) -> ReduceNodeRef
Descend to the child of this handle.
Sourcefn child_count(&self) -> usize
fn child_count(&self) -> usize
Returns the number of children of this node.