Skip to main content

DotGraphInput

Struct DotGraphInput 

Source
pub struct DotGraphInput<NI, Label>
where NI: Idx, Label: Idx,
{ /* private fields */ }
Available on crate feature dotgraph only.
Expand description

DotGraph (the name is based on the file ending .graph) is a textual description of a node labeled graph primarily used as input for subgraph isomorphism libraries. It has been introduced here and is also supported by the subgraph-matching crate.

A graph starts with ‘t N M’ where N is the number of nodes and M is the number of edges. A node and an edge are formatted as ‘v nodeId labelId degree’ and ‘e nodeId nodeId’ respectively. Note that the format requires that the node id starts at 0 and the range is 0..N.

§Example

The following graph contains 5 nodes and 6 relationships. The first line contains that meta information. The following 5 lines contain one node description per line, e.g., v 0 0 2 translates to node 0 with label 0 and a degree of 2. Following the nodes, the remaining lines describe edges, e.g., e 0 1 represents an edge connecting nodes 0 and 1.

> cat my_graph.graph
t 5 6
v 0 0 2
v 1 1 3
v 2 2 3
v 3 1 2
v 4 2 2
e 0 1
e 0 2
e 1 2
e 1 3
e 2 4
e 3 4

Trait Implementations§

Source§

impl<NI, Label> Default for DotGraphInput<NI, Label>
where NI: Idx, Label: Idx,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<NI: Idx, Label: Idx> InputCapabilities<NI> for DotGraphInput<NI, Label>

Source§

type GraphInput = DotGraph<NI, Label>

Auto Trait Implementations§

§

impl<NI, Label> Freeze for DotGraphInput<NI, Label>

§

impl<NI, Label> RefUnwindSafe for DotGraphInput<NI, Label>
where NI: RefUnwindSafe, Label: RefUnwindSafe,

§

impl<NI, Label> Send for DotGraphInput<NI, Label>

§

impl<NI, Label> Sync for DotGraphInput<NI, Label>

§

impl<NI, Label> Unpin for DotGraphInput<NI, Label>
where NI: Unpin, Label: Unpin,

§

impl<NI, Label> UnsafeUnpin for DotGraphInput<NI, Label>

§

impl<NI, Label> UnwindSafe for DotGraphInput<NI, Label>
where NI: UnwindSafe, Label: UnwindSafe,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.