pub struct CSE<N, C>where
C: CSEController<Node = N>,{ /* private fields */ }
Expand description
The main entry point of Common Subexpression Elimination.
CSE
requires a CSEController
, that defines how common subtrees of a particular
TreeNode
tree can be eliminated. The elimination process can be started with the
CSE::extract_common_nodes()
method.
Implementations§
Source§impl<N, C> CSE<N, C>
impl<N, C> CSE<N, C>
pub fn new(controller: C) -> CSE<N, C>
Sourcepub fn extract_common_nodes(
&mut self,
nodes_list: Vec<Vec<N>>,
) -> Result<FoundCommonNodes<N>, DataFusionError>
pub fn extract_common_nodes( &mut self, nodes_list: Vec<Vec<N>>, ) -> Result<FoundCommonNodes<N>, DataFusionError>
Extracts common TreeNode
s and rewrites nodes_list
.
Returns FoundCommonNodes
recording the result of the extraction.
Auto Trait Implementations§
impl<N, C> Freeze for CSE<N, C>where
C: Freeze,
impl<N, C> RefUnwindSafe for CSE<N, C>where
C: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, C> Send for CSE<N, C>
impl<N, C> Sync for CSE<N, C>
impl<N, C> Unpin for CSE<N, C>
impl<N, C> UnwindSafe for CSE<N, C>where
C: UnwindSafe,
N: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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