Struct VisualGraph

Source
pub struct VisualGraph {
    pub dag: DAG,
    /* private fields */
}

Fields§

§dag: DAG

Implementations§

Source§

impl VisualGraph

Source

pub fn new(orientation: Orientation) -> Self

Source

pub fn orientation(&self) -> Orientation

Source

pub fn num_nodes(&self) -> usize

Source

pub fn iter_nodes(&self) -> NodeIterator

Source

pub fn succ(&self, node: NodeHandle) -> &Vec<NodeHandle>

Source

pub fn preds(&self, node: NodeHandle) -> &Vec<NodeHandle>

Source

pub fn pos(&self, n: NodeHandle) -> Position

Source

pub fn pos_mut(&mut self, n: NodeHandle) -> &mut Position

Source

pub fn is_connector(&self, n: NodeHandle) -> bool

Source

pub fn transpose(&mut self)

Source

pub fn element(&self, node: NodeHandle) -> &Element

Source

pub fn element_mut(&mut self, node: NodeHandle) -> &mut Element

Source

pub fn add_node(&mut self, elem: Element) -> NodeHandle

Add a node to the graph. \returns a handle to the node.

Source

pub fn add_edge(&mut self, arrow: Arrow, from: NodeHandle, to: NodeHandle)

Add an edge to the graph.

Source§

impl VisualGraph

Source

pub fn do_it( &mut self, debug_mode: bool, disable_opt: bool, disable_layout: bool, rb: &mut dyn RenderBackend, )

Source

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.

Source

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.

Source

pub fn split_long_edges(&mut self, disable_optimizations: bool)

Source

pub fn expand_self_edges(&mut self)

Convert all of the saved self edges into proper edges in the graph.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.