pub struct NodeView<'a, N, E, M> { /* private fields */ }Expand description
A read-only view over the nodes of a hypergraph.
Implementations§
Source§impl<'a, N, E, M> NodeView<'a, N, E, M>
impl<'a, N, E, M> NodeView<'a, N, E, M>
Sourcepub fn attrs(&self, node_id: &str) -> Option<&'a N>
pub fn attrs(&self, node_id: &str) -> Option<&'a N>
The node’s attributes. XGI parity: H.nodes[n].
Sourcepub fn degree(&self, node_id: &str) -> usize
pub fn degree(&self, node_id: &str) -> usize
The number of edges the node belongs to. XGI parity: H.nodes.degree.
Sourcepub fn memberships(&self, node_id: &str) -> Option<Vec<String>>
pub fn memberships(&self, node_id: &str) -> Option<Vec<String>>
The edge ids the node is a member of. XGI parity:
H.nodes.memberships(n) (views.py:604-630).
Sourcepub fn duplicate_groups(&self) -> Vec<Vec<String>>
pub fn duplicate_groups(&self) -> Vec<Vec<String>>
Node ids with the same edge-membership 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.nodes.duplicate_groups().
Sourcepub fn isolates(&self) -> NodeView<'a, N, E, M>
pub fn isolates(&self) -> NodeView<'a, N, E, M>
Sub-view of degree-0 nodes. XGI parity: H.nodes.isolates().
Sourcepub fn isolates_ignoring_singletons(&self) -> NodeView<'a, N, E, M>
pub fn isolates_ignoring_singletons(&self) -> NodeView<'a, N, E, M>
Sub-view of nodes in no edge of size >= 2. XGI parity:
H.nodes.isolates(ignore_singletons=True) (views.py:632-667).
Sourcepub fn filterby_degree(
&self,
val: usize,
mode: FilterMode,
) -> NodeView<'a, N, E, M>
pub fn filterby_degree( &self, val: usize, mode: FilterMode, ) -> NodeView<'a, N, E, M>
Sub-view of nodes whose degree satisfies mode vs val.
XGI parity: H.nodes.filterby('degree', val, mode).
Sourcepub fn filterby_degree_between(
&self,
lo: usize,
hi: usize,
) -> NodeView<'a, N, E, M>
pub fn filterby_degree_between( &self, lo: usize, hi: usize, ) -> NodeView<'a, N, E, M>
Sub-view of nodes with lo <= degree <= hi.
XGI parity: filterby('degree', (lo, hi), 'between').
Auto Trait Implementations§
impl<'a, N, E, M> Forget for NodeView<'a, N, E, M>
impl<'a, N, E, M> Freeze for NodeView<'a, N, E, M>
impl<'a, N, E, M> Move for NodeView<'a, N, E, M>
impl<'a, N, E, M> RefUnwindSafe for NodeView<'a, N, E, M>
impl<'a, N, E, M> Send for NodeView<'a, N, E, M>
impl<'a, N, E, M> Sync for NodeView<'a, N, E, M>
impl<'a, N, E, M> Unpin for NodeView<'a, N, E, M>
impl<'a, N, E, M> UnsafeUnpin for NodeView<'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 NodeView<'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.