pub struct EdgeList<E> {
pub n_vertices: usize,
/* private fields */
}Expand description
A graph represented as a list of edges, whose vertices are in the range 0..n_vertices.
No self-loops are allowed.
Fields§
§n_vertices: usizeTotal number of vertices.
Implementations§
Source§impl<E: Edge> EdgeList<E>
impl<E: Edge> EdgeList<E>
Sourcepub fn edges_mut(&mut self) -> &mut [E]
pub fn edges_mut(&mut self) -> &mut [E]
Returns a mutable slice of the underlying slice of edges.
Sourcepub fn from_iterator<I: Iterator<Item = E>>(it: I) -> Self
pub fn from_iterator<I: Iterator<Item = E>>(it: I) -> Self
Collects all the edges from the given iterator.
Sourcepub fn number_of_vertices(&self) -> usize
pub fn number_of_vertices(&self) -> usize
Returns the number of vertices.
Sourcepub fn add_edge(&mut self, e: E)
pub fn add_edge(&mut self, e: E)
Adds an edge to the graph. Panics: if the edge to add is a self-loop.
Sourcepub fn maximum_degree(&self) -> usize
pub fn maximum_degree(&self) -> usize
Returns the maximum degree of a vertex in the edge list.
Source§impl<VF: Value, const N: usize> EdgeList<FilteredEdge<OneCriticalGrade<VF, N>>>
impl<VF: Value, const N: usize> EdgeList<FilteredEdge<OneCriticalGrade<VF, N>>>
Sourcepub fn sort_lexicographically(&mut self)
pub fn sort_lexicographically(&mut self)
Sort the filtered edges lexicographically in increasing order.
Sourcepub fn sort_reverse_lexicographically(&mut self)
pub fn sort_reverse_lexicographically(&mut self)
Reverse sort the filtered edges lexicographically.
Sourcepub fn sort_colexicographically(&mut self)
pub fn sort_colexicographically(&mut self)
Sort the filtered edges colexicographically in increasing order.
Sourcepub fn sort_reverse_colexicographically(&mut self)
pub fn sort_reverse_colexicographically(&mut self)
Reverse sort the filtered edges colexicographically.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for EdgeList<E>
impl<E> RefUnwindSafe for EdgeList<E>where
E: RefUnwindSafe,
impl<E> Send for EdgeList<E>where
E: Send,
impl<E> Sync for EdgeList<E>where
E: Sync,
impl<E> Unpin for EdgeList<E>where
E: Unpin,
impl<E> UnwindSafe for EdgeList<E>where
E: UnwindSafe,
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