pub trait RandomAccessLabeling: SequentialLabeling {
type Labels<'succ>: IntoIterator<Item = <Self as SequentialLabeling>::Label>
where Self: 'succ;
// Required methods
fn num_arcs(&self) -> u64;
fn labels(
&self,
node_id: usize,
) -> <Self as RandomAccessLabeling>::Labels<'_>;
fn outdegree(&self, node_id: usize) -> usize;
}Expand description
A SequentialLabeling providing, additionally, random access to
the list of labels associated with a node.
The function check_impl can be used to check whether the
sequential and random-access implementations of a labeling are consistent.
Required Associated Types§
Sourcetype Labels<'succ>: IntoIterator<Item = <Self as SequentialLabeling>::Label>
where
Self: 'succ
type Labels<'succ>: IntoIterator<Item = <Self as SequentialLabeling>::Label> where Self: 'succ
The type of the iterator over the labels of a node
returned by labels.
Required Methods§
Sourcefn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>
fn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>
Returns the labels associated with a node.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.