I know why you blame me
This commit is contained in:
parent
e14eb1b870
commit
ce95eb2516
3 changed files with 16 additions and 2 deletions
|
|
@ -1,16 +1,27 @@
|
|||
use crate::formula::node::graph_constructor::GraphBuilder;
|
||||
|
||||
mod function;
|
||||
mod graph_constructor;
|
||||
|
||||
pub struct Node {
|
||||
children: Vec<Node>,
|
||||
function: fn(Vec<f64>) -> f64,
|
||||
}
|
||||
|
||||
impl Node {
|
||||
pub fn empty() -> Self {
|
||||
Node { children: vec![] }
|
||||
Node {
|
||||
children: vec![],
|
||||
function: |_| 0f64,
|
||||
}
|
||||
}
|
||||
pub fn build() -> GraphBuilder {
|
||||
GraphBuilder
|
||||
}
|
||||
pub fn get_value(&self) -> f64 {
|
||||
if self.children.len() == 0 {
|
||||
0f64
|
||||
}
|
||||
for node in self.children {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue