pub struct EdgeView<'a, N, E, M> { /* private fields */ }Expand description
A read-only view over the edges of a hypergraph.
Implementations§
Source§impl<'a, N, E, M> EdgeView<'a, N, E, M>
impl<'a, N, E, M> EdgeView<'a, N, E, M>
Sourcepub fn attrs(&self, edge_id: &str) -> Option<&'a E>
pub fn attrs(&self, edge_id: &str) -> Option<&'a E>
The edge’s attributes. XGI parity: H.edges[e].
Sourcepub fn size(&self, edge_id: &str) -> usize
pub fn size(&self, edge_id: &str) -> usize
The number of members. XGI parity: H.edges.size (edgestats.py:148).
Sourcepub fn order(&self, edge_id: &str) -> usize
pub fn order(&self, edge_id: &str) -> usize
The order (size − 1). XGI parity: H.edges.order (edgestats.py:108).
Saturates at 0 (our edges are never empty in normal use).
Sourcepub fn members(&self, edge_id: &str) -> Option<Vec<String>>
pub fn members(&self, edge_id: &str) -> Option<Vec<String>>
The member node ids. XGI parity: H.edges.members(e) (views.py:706-747).
Sourcepub fn singletons(&self) -> EdgeView<'a, N, E, M>
pub fn singletons(&self) -> EdgeView<'a, N, E, M>
Sub-view of size-1 edges. XGI parity: H.edges.singletons().
Sourcepub fn empty(&self) -> EdgeView<'a, N, E, M>
pub fn empty(&self) -> EdgeView<'a, N, E, M>
Sub-view of size-0 edges. XGI parity: H.edges.empty().
Sourcepub fn filterby_size(
&self,
val: usize,
mode: FilterMode,
) -> EdgeView<'a, N, E, M>
pub fn filterby_size( &self, val: usize, mode: FilterMode, ) -> EdgeView<'a, N, E, M>
Sub-view of edges whose size satisfies mode vs val.
Sourcepub fn filterby_order(
&self,
val: usize,
mode: FilterMode,
) -> EdgeView<'a, N, E, M>
pub fn filterby_order( &self, val: usize, mode: FilterMode, ) -> EdgeView<'a, N, E, M>
Sub-view of edges whose order satisfies mode vs val.
Sourcepub fn duplicate_groups(&self) -> Vec<Vec<String>>
pub fn duplicate_groups(&self) -> Vec<Vec<String>>
Edge ids with the same member set, grouped. Only groups of two or more; groups in order of
first occurrence in this view; ids in a group in insertion order. XGI parity:
H.edges.duplicate_groups().
Sourcepub fn duplicates(&self) -> EdgeView<'a, N, E, M>
pub fn duplicates(&self) -> EdgeView<'a, N, E, M>
Sub-view of edges that duplicate an earlier one (same member-set).
The first (sorted) id of each group is kept; the rest are duplicates.
XGI parity: H.edges.duplicates() (views.py:409-465).
Auto Trait Implementations§
impl<'a, N, E, M> Forget for EdgeView<'a, N, E, M>
impl<'a, N, E, M> Freeze for EdgeView<'a, N, E, M>
impl<'a, N, E, M> Move for EdgeView<'a, N, E, M>
impl<'a, N, E, M> RefUnwindSafe for EdgeView<'a, N, E, M>
impl<'a, N, E, M> Send for EdgeView<'a, N, E, M>
impl<'a, N, E, M> Sync for EdgeView<'a, N, E, M>
impl<'a, N, E, M> Unpin for EdgeView<'a, N, E, M>
impl<'a, N, E, M> UnsafeUnpin for EdgeView<'a, N, E, M>where
&'a Hypergraph<N, E, M>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl<'a, N, E, M> UnwindSafe for EdgeView<'a, N, E, M>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.