Struct graph_edge_evolution::GraphBuilder
[−]
[src]
pub struct GraphBuilder<W: Debug + Default + Clone, N: Debug + Default + Clone> { /* fields omitted */ }
Methods
impl<W: Debug + Default + Clone + AddAssign<W>, N: Debug + Default + Clone> GraphBuilder<W, N>
[src]
fn new() -> GraphBuilder<W, N>
fn save(&mut self)
Saves the current state to the internal state stack.
fn restore(&mut self) -> bool
Restore a previously saved state. Returns false, if no saved state exists on the stack.
fn count_nodes(&self) -> usize
fn visit_nodes<F: FnMut(usize, &N)>(&self, callback: F)
fn visit_edges<F: FnMut((usize, usize), &W)>(&self, callback: F)
fn to_edge_list(&self) -> Vec<Option<(N, Vec<(usize, W)>)>>
fn apply_operation<NT: NthEdge>(&mut self, op: EdgeOperation<W, N, NT>) where
W: Neg<Output = W>,
W: Neg<Output = W>,
fn update_edge_weight(&mut self, weight: W)
decrease-weight or increase-weight, depending on the sign of the weight. Updates the weight of the current edge, or in case of a virtual edge, creates a new edge with that weight.
fn add_self_loop(&mut self, weight: W)
Adds a loop to the current edge's target neuron.
fn next<NT: NthEdge>(&mut self, n: NT)
Change from-node of current link to it's n-th sibling. The n-th sibling is the current+n-th incoming node into the to-node.
fn parent<NT: NthEdge>(&mut self, n: NT)
Change from-node of current link to n-th input edge of current from node. If no input edge exists, the edge is left as is. TODO: Test case The n-th input node is not deleted. NOTE: Does not modify the graph itself, only changes the current link.