diff --git a/src/circuit/dag.rs b/src/circuit/dag.rs index 577952d..33c6a9a 100644 --- a/src/circuit/dag.rs +++ b/src/circuit/dag.rs @@ -11,6 +11,7 @@ new_key_type! { pub struct NodeId; } #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum Node { Leaf(V), + Scale(NodeId, i32), Sum(NodeId, NodeId), Prod(NodeId, NodeId), } @@ -19,6 +20,7 @@ impl Node { pub fn children(&self) -> impl Iterator { match self { Node::Leaf(_) => [None, None], + Node::Scale(n,_) => [Some(*n), None], Node::Sum(l, r) | Node::Prod(l, r) => [Some(*l), Some(*r)], } .into_iter()