ReduceNode

Trait ReduceNode 

Source
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;

    // Provided method
    fn children(&self) -> Vec<ReduceNodeRef>  { ... }
}
Expand description

A node used for implementing abstract reduction rules.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Downcast to Any.

Source

fn node_dtype(&self) -> VortexResult<DType>

Return the data type of this node.

Source

fn scalar_fn(&self) -> Option<&ScalarFn>

Return this node’s scalar function if it is indeed a scalar fn.

Source

fn child(&self, idx: usize) -> ReduceNodeRef

Descend to the child of this handle.

Source

fn child_count(&self) -> usize

Returns the number of children of this node.

Provided Methods§

Source

fn children(&self) -> Vec<ReduceNodeRef>

Returns the children of this node.

Implementors§