Skip to main content

RandomAccessLabeling

Trait RandomAccessLabeling 

Source
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§

Source

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§

Source

fn num_arcs(&self) -> u64

Returns the number of arcs in the graph.

Source

fn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>

Returns the labels associated with a node.

Source

fn outdegree(&self, node_id: usize) -> usize

Returns the number of 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.

Implementations on Foreign Types§

Source§

impl<S: RandomAccessLabeling + ?Sized> RandomAccessLabeling for &S

Source§

type Labels<'succ> = <S as RandomAccessLabeling>::Labels<'succ> where Self: 'succ

Source§

fn num_arcs(&self) -> u64

Source§

fn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>

Source§

fn outdegree(&self, node_id: usize) -> usize

Source§

impl<S: RandomAccessLabeling + ?Sized> RandomAccessLabeling for &mut S

Source§

type Labels<'succ> = <S as RandomAccessLabeling>::Labels<'succ> where Self: 'succ

Source§

fn num_arcs(&self) -> u64

Source§

fn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>

Source§

fn outdegree(&self, node_id: usize) -> usize

Source§

impl<S: RandomAccessLabeling + ?Sized> RandomAccessLabeling for Rc<S>

Source§

type Labels<'succ> = <S as RandomAccessLabeling>::Labels<'succ> where Self: 'succ

Source§

fn num_arcs(&self) -> u64

Source§

fn labels(&self, node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>

Source§

fn outdegree(&self, node_id: usize) -> usize

Implementors§

Source§

impl RandomAccessLabeling for BTreeGraph

Source§

type Labels<'succ> = Succ<'succ>

Source§

impl RandomAccessLabeling for VecGraph

Source§

impl<DCF, S> RandomAccessLabeling for CsrGraph<DCF, S>
where DCF: SliceByValue<Value = usize> + IterateByValueFrom<Item = usize>, S: SliceByValue<Value = usize> + IterateByValueFrom<Item = usize>,

Source§

type Labels<'succ> = Take<<S as IterateByValueFromGat<'succ>>::IterFrom> where Self: 'succ

Source§

impl<DCF, S> RandomAccessLabeling for CsrSortedGraph<DCF, S>
where DCF: SliceByValue<Value = usize> + IterateByValueFrom<Item = usize>, S: SliceByValue<Value = usize> + IterateByValueFrom<Item = usize>,

Source§

type Labels<'succ> = AssumeSortedIterator<Take<<S as IterateByValueFromGat<'succ>>::IterFrom>> where Self: 'succ

Source§

impl<F> RandomAccessLabeling for BvGraph<F>

Source§

type Labels<'a> = Succ<<F as RandomAccessDecoderFactory>::Decoder<'a>> where Self: 'a, F: 'a

Source§

impl<G: RandomAccessGraph> RandomAccessLabeling for UnitLabelGraph<G>

Source§

type Labels<'succ> = UnitSucc<<<G as RandomAccessLabeling>::Labels<'succ> as IntoIterator>::IntoIter> where Self: 'succ

Source§

impl<L, E: Endianness, S: Supply, D, O: Offsets> RandomAccessLabeling for BitStreamLabeling<E, S, D, O>
where for<'a> S::Item<'a>: BitRead<E> + BitSeek, for<'a> D: BitDeserializer<E, S::Item<'a>, DeserType = L>,

Source§

type Labels<'succ> = Labels<'succ, E, <S as Supply>::Item<'succ>, D> where Self: 'succ

Source§

impl<L: Clone + 'static> RandomAccessLabeling for LabeledBTreeGraph<L>

Source§

type Labels<'succ> = LabeledSucc<'succ, L> where L: 'succ

Source§

impl<L: Clone + 'static> RandomAccessLabeling for LabeledVecGraph<L>

Source§

impl<L: RandomAccessLabeling, R: RandomAccessLabeling> RandomAccessLabeling for Zip<L, R>

Source§

type Labels<'succ> = Zip<<<L as RandomAccessLabeling>::Labels<'succ> as IntoIterator>::IntoIter, <<R as RandomAccessLabeling>::Labels<'succ> as IntoIterator>::IntoIter> where <L as RandomAccessLabeling>::Labels<'succ>: IntoIterator<Item = <L as SequentialLabeling>::Label>, <R as RandomAccessLabeling>::Labels<'succ>: IntoIterator<Item = <R as SequentialLabeling>::Label>, Self: 'succ

Source§

impl<R: RandomAccessLabeling> RandomAccessLabeling for Left<R>
where R::Label: Pair,

Source§

type Labels<'succ> = IntoLeftSucc<<R as RandomAccessLabeling>::Labels<'succ>> where Self: 'succ

Source§

impl<R: RandomAccessLabeling> RandomAccessLabeling for Right<R>
where R::Label: Pair,

Source§

type Labels<'succ> = IntoRightSucc<<R as RandomAccessLabeling>::Labels<'succ>> where Self: 'succ