pub struct Cycle {
pub vertices: Vec<VertexId>,
pub edges: Vec<EdgeId>,
}Expand description
A cycle (closed walk) of a graph, given both as vertices and edges.
edges[i] connects vertices[i] and vertices[(i + 1) % len]: the first
vertex is not repeated at the end, so vertices.len() == edges.len(),
which is the length of the cycle. A self-loop is a cycle of length 1, and
two parallel edges form a cycle of length 2 (when they can be traversed in
opposite directions: undirected edges, mutual directed edges, or any
directed edges with NeighborMode::All).
Fields§
§vertices: Vec<VertexId>The vertices of the cycle, in traversal order.
edges: Vec<EdgeId>The edges of the cycle, in traversal order.
Implementations§
Trait Implementations§
impl Eq for Cycle
impl StructuralPartialEq for Cycle
Auto Trait Implementations§
impl Freeze for Cycle
impl RefUnwindSafe for Cycle
impl Send for Cycle
impl Sync for Cycle
impl Unpin for Cycle
impl UnsafeUnpin for Cycle
impl UnwindSafe for Cycle
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