pub struct NodeUpdater<'a> { /* private fields */ }Expand description
Chained setters for one node of a Tree.
Implementations§
Source§impl<'a> NodeUpdater<'a>
impl<'a> NodeUpdater<'a>
pub fn new(node: &'a mut TreeNode) -> Self
pub fn value(self, value: NodeInfos) -> Self
pub fn error(self, error: f64) -> Self
pub fn metric(self, metric: f64) -> Self
pub fn output(self, output: f64) -> Self
pub fn test(self, test: usize) -> Self
pub fn left_child(self, index: usize) -> Self
pub fn right_child(self, index: usize) -> Self
Sourcepub fn leaf(self) -> Self
pub fn leaf(self) -> Self
Detaches the node’s children. The tested feature is kept; use
Self::clean_test to clear it.
pub fn clean_test(self) -> Self
pub fn get_children(&self) -> (usize, usize)
Auto Trait Implementations§
impl<'a> !UnwindSafe for NodeUpdater<'a>
impl<'a> Freeze for NodeUpdater<'a>
impl<'a> RefUnwindSafe for NodeUpdater<'a>
impl<'a> Send for NodeUpdater<'a>
impl<'a> Sync for NodeUpdater<'a>
impl<'a> Unpin for NodeUpdater<'a>
impl<'a> UnsafeUnpin for NodeUpdater<'a>
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