basic tests done, fixed children calculation problem
This commit is contained in:
parent
9c487308be
commit
7a98924965
3 changed files with 11 additions and 18 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -5,18 +5,4 @@ mod node;
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
fn main() {
|
||||
let mut formula = Formula::new();
|
||||
formula
|
||||
.modify_tree()
|
||||
.insert_node(Node::function(|inputs| inputs.iter().sum(), Some(2)), None);
|
||||
if let Err(x) = formula
|
||||
.modify_tree()
|
||||
.go_down(0)
|
||||
.add_node(Node::number(1f64))
|
||||
{
|
||||
println!("{x}");
|
||||
}
|
||||
formula.display_tree();
|
||||
let results = formula.run(vec![0f64, 1f64, 2f64, 3f64, 4f64, 5f64]);
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue