pub struct VisualGraph {
pub dag: DAG,
/* private fields */
}
Fields§
§dag: DAG
Implementations§
Source§impl VisualGraph
impl VisualGraph
pub fn new(orientation: Orientation) -> Self
pub fn orientation(&self) -> Orientation
pub fn num_nodes(&self) -> usize
pub fn iter_nodes(&self) -> NodeIterator ⓘ
pub fn succ(&self, node: NodeHandle) -> &Vec<NodeHandle>
pub fn preds(&self, node: NodeHandle) -> &Vec<NodeHandle>
pub fn pos(&self, n: NodeHandle) -> Position
pub fn pos_mut(&mut self, n: NodeHandle) -> &mut Position
pub fn is_connector(&self, n: NodeHandle) -> bool
pub fn transpose(&mut self)
pub fn element(&self, node: NodeHandle) -> &Element
pub fn element_mut(&mut self, node: NodeHandle) -> &mut Element
Sourcepub fn add_node(&mut self, elem: Element) -> NodeHandle
pub fn add_node(&mut self, elem: Element) -> NodeHandle
Add a node to the graph. \returns a handle to the node.
Sourcepub fn add_edge(&mut self, arrow: Arrow, from: NodeHandle, to: NodeHandle)
pub fn add_edge(&mut self, arrow: Arrow, from: NodeHandle, to: NodeHandle)
Add an edge to the graph.
Source§impl VisualGraph
impl VisualGraph
pub fn do_it( &mut self, debug_mode: bool, disable_opt: bool, disable_layout: bool, rb: &mut dyn RenderBackend, )
Sourcepub fn to_valid_dag(&mut self)
pub fn to_valid_dag(&mut self)
Flip the edges in the graph to create a valid dag. This is the first step of graph canonicalization.
Sourcepub fn split_text_edges(&mut self)
pub fn split_text_edges(&mut self)
Convert all of the edges that contain text labels to edges that go through connectors. This is the second step of graph canonicalization.
pub fn split_long_edges(&mut self, disable_optimizations: bool)
Sourcepub fn expand_self_edges(&mut self)
pub fn expand_self_edges(&mut self)
Convert all of the saved self edges into proper edges in the graph.
Auto Trait Implementations§
impl Freeze for VisualGraph
impl RefUnwindSafe for VisualGraph
impl Send for VisualGraph
impl Sync for VisualGraph
impl Unpin for VisualGraph
impl UnwindSafe for VisualGraph
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