Enum catalan::BinaryNode
source · pub enum BinaryNode {
Atomic,
Binary {
lhs: Arc<BinaryNode>,
rhs: Arc<BinaryNode>,
},
}
Expand description
A element in full binary tree Can be a atom or a node
Variants§
Implementations§
source§impl BinaryNode
impl BinaryNode
sourcepub fn as_rpn(&self) -> ReversePolishNotation
pub fn as_rpn(&self) -> ReversePolishNotation
Convert a full binary tree to reverse polish notation
source§impl BinaryNode
impl BinaryNode
sourcepub fn as_expression<V, O>(
&self,
values: Vec<V>,
actions: Vec<O>
) -> Arc<ExpressionNode<V, O>>
pub fn as_expression<V, O>( &self, values: Vec<V>, actions: Vec<O> ) -> Arc<ExpressionNode<V, O>>
Make the binary tree into an expression tree
Trait Implementations§
source§impl Clone for BinaryNode
impl Clone for BinaryNode
source§fn clone(&self) -> BinaryNode
fn clone(&self) -> BinaryNode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BinaryNode
impl Debug for BinaryNode
source§impl Default for BinaryNode
impl Default for BinaryNode
source§impl Hash for BinaryNode
impl Hash for BinaryNode
source§impl PartialEq<BinaryNode> for BinaryNode
impl PartialEq<BinaryNode> for BinaryNode
source§fn eq(&self, other: &BinaryNode) -> bool
fn eq(&self, other: &BinaryNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.