Struct NaiveTaggedGraph

Source
pub struct NaiveTaggedGraph<V, E, G = TreeBackedGraph>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone,
{ /* private fields */ }
Expand description

A naive implementation of tagged graphs.

Trait Implementations§

Source§

impl<V, E, G: Clone> Clone for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone + Clone, E: Hash + Eq + Clone + Clone,

Source§

fn clone(&self) -> NaiveTaggedGraph<V, E, G>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<V, E, G> Default for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge, G: GrowableGraph,

Source§

fn default() -> Self

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

impl<V, E, G> DirectedOrNot for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone, G: DirectedOrNot,

Source§

const DIRECTED_OR_NOT: bool = G::DIRECTED_OR_NOT

When the graph is directed, it is true; otherwise, it is false.
Source§

impl<V, E, G> EdgeShrinkableTaggedGraph for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge, G: EdgeShrinkableGraph,

Source§

fn remove_edge(&mut self, eid: &EdgeId) -> Option<Self::Edge>

Removes an edge and returns it if it is present. Read more
Source§

impl<V, E, G> GrowableTaggedGraph for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge, G: GrowableGraph,

Source§

fn new() -> Self

Creates an empty graph.
Source§

fn overwrite_vertex(&mut self, vert: Self::Vertex) -> VertexId

Inserts a vertex if it is unpresent or updates the one with a same VertexId.
Source§

fn add_edge(&mut self, edge: Self::Edge) -> EdgeId

Adds an edge and returns its EdgeId.
Source§

fn update_edge(&mut self, eid: EdgeId, new: Self::Edge)

Updates an edge w.r.t. its EdgeId.
Source§

impl<V, E, G> QueryableTaggedGraph for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge, G: QueryableGraph,

Source§

fn vertex_size(&self) -> usize

Total number of vertices.
Source§

fn iter_vertices( &self, ) -> Box<dyn Iterator<Item = (VertexId, &Self::Vertex)> + '_>

Iterates over vertices without any specific order.
Source§

fn edge_size(&self) -> usize

Total number of edges.
Source§

fn iter_edges(&self) -> Box<dyn Iterator<Item = (Edge, &Self::Edge)> + '_>

Iterates edges without any specific order.
Source§

fn edges_connecting( &self, source: &VertexId, sink: &VertexId, ) -> Box<dyn Iterator<Item = (Edge, &Self::Edge)> + '_>

Iterates edges connecting two specified endpoints.
Source§

fn in_edges( &self, vid: &VertexId, ) -> Box<dyn Iterator<Item = (Edge, &Self::Edge)> + '_>

Iterates over in-edges of a specified vertex.
Source§

fn out_edges( &self, vid: &VertexId, ) -> Box<dyn Iterator<Item = (Edge, &Self::Edge)> + '_>

Iterates over out-edges of a specified vertex.
Source§

impl<V, E, G> TaggedGraph for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge,

Source§

type LowerGraph = G

type of underlying low-level graph
Source§

type Vertex = V

customized vertex type
Source§

type Edge = E

customized edge type
Source§

fn lower_graph(&self) -> &Self::LowerGraph

Source§

fn vertex_by_id(&self, vid: &VertexId) -> Option<&Self::Vertex>

Source§

fn id_by_vertex(&self, vert: &Self::Vertex) -> Option<VertexId>

Source§

fn edge_by_id(&self, eid: &EdgeId) -> Option<&Self::Edge>

Source§

fn id_by_edge(&self, edge: &Self::Edge) -> Option<EdgeId>

Source§

fn contains_vertex_by_id(&self, vid: &VertexId) -> bool

Source§

fn contains_vertex(&self, vert: &Self::Vertex) -> bool

Source§

fn contains_edge_by_id(&self, eid: &EdgeId) -> bool

Source§

fn contains_edge(&self, edge: &Self::Edge) -> bool

Source§

impl<V, E, G> VertexShrinkableTaggedGraph for NaiveTaggedGraph<V, E, G>
where V: Hash + Eq + Clone, E: Hash + Eq + Clone + Edge, G: VertexShrinkableGraph,

Source§

fn remove_vertex( &mut self, vid: &VertexId, ) -> Box<dyn Iterator<Item = (EdgeId, Self::Edge)> + '_>

Removes a vertex and edges connecting to it and returns these edges.

Auto Trait Implementations§

§

impl<V, E, G> Freeze for NaiveTaggedGraph<V, E, G>
where G: Freeze,

§

impl<V, E, G> RefUnwindSafe for NaiveTaggedGraph<V, E, G>

§

impl<V, E, G> Send for NaiveTaggedGraph<V, E, G>
where G: Send, V: Send, E: Send,

§

impl<V, E, G> Sync for NaiveTaggedGraph<V, E, G>
where G: Sync, V: Sync, E: Sync,

§

impl<V, E, G> Unpin for NaiveTaggedGraph<V, E, G>
where G: Unpin,

§

impl<V, E, G> UnwindSafe for NaiveTaggedGraph<V, E, G>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<G> SimpleCyclesForTaggedGraph for G

Source§

fn simple_cycles( &self, ) -> Box<dyn Iterator<Item = Box<dyn Iterator<Item = (EdgeId, &Self::Edge)> + '_>> + '_>

Iterates over all simple cycles.
Source§

fn simple_cycles_reachable_from( &self, vert: &Self::Vertex, ) -> Box<dyn Iterator<Item = Box<dyn Iterator<Item = (EdgeId, &Self::Edge)> + '_>> + '_>

Iterates over simple cycles only reachable from vert.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.