pub struct Graph {
pub nodes: Vec<Node>,
pub root: NodeId,
}Expand description
A polynomial expression as a graph in which equal subexpressions share a node.
Children come before their parents, every node is reachable from the root,
and the root is the last node. Unary minus is represented as 0 - x.
Fields§
§nodes: Vec<Node>The nodes, in dependency order.
root: NodeIdThe node holding the value of the whole expression.
Trait Implementations§
impl Eq for Graph
impl StructuralPartialEq for Graph
Auto Trait Implementations§
impl Forget for Graph
impl Freeze for Graph
impl Move for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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