add polynomial division

This commit is contained in:
2026-04-22 19:35:39 +02:00
parent 5bc6124222
commit 79bf205762
4 changed files with 274 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
use super::dag::{Circuit, NodeId};
use super::dag::{Circuit, Node, NodeId};
use crate::poly::{flat::Poly, var::Var};
use itertools::Itertools;
@@ -35,10 +35,10 @@ impl<V: Var> Quotient<V> {
self.circuit.node(n)
}
pub fn add(left: NodeId, right: NodeId) {
pub fn add(&mut self, left: NodeId, right: NodeId) -> NodeId {
self.circuit.add(left, right)
}
pub fn mul(left: NodeId, right: NodeId) {
pub fn mul(&mut self, left: NodeId, right: NodeId) -> NodeId {
self.circuit.mul(left, right)
}
}