Skip to main content

UsizeGraph

Struct UsizeGraph 

Source
pub struct UsizeGraph<Fa> {
    vsize: usize,
    adj: Fa,
}

Fields§

§vsize: usize§adj: Fa

Implementations§

Source§

impl<Fa> UsizeGraph<Fa>

Source

pub fn new(vsize: usize, adj: Fa) -> Self

Trait Implementations§

Source§

impl<Fa> DirectedGraph for UsizeGraph<Fa>
where UsizeGraph<Fa>: Graph,

Source§

impl<Fa, I, T> Graph for UsizeGraph<Fa>
where I: Iterator<Item = (usize, T)>, Fa: Fn(usize) -> I,

Source§

type Vertex = usize

Source§

type Label = T

Source§

type Vertices<'g> = Range<usize> where Fa: 'g

Source§

type Neighbors<'g> = Map<I, fn((usize, T)) -> Neighbor<usize, T>> where Fa: 'g

Source§

fn vsize(&self) -> usize

Source§

fn vertices(&self) -> Self::Vertices<'_>

Source§

fn neighbors(&self, vertex: Self::Vertex) -> Self::Neighbors<'_>

Source§

impl<Fa, T> VertexMap<T> for UsizeGraph<Fa>
where Self: Graph<Vertex = usize>,

Source§

type Vmap = Vec<T>

Source§

fn construct_vmap<F>(&self, f: F) -> Self::Vmap
where F: FnMut() -> T,

Source§

fn vmap_get<'a>(&self, map: &'a Self::Vmap, vid: Self::Vertex) -> &'a T

Source§

fn vmap_get_mut<'a>( &self, map: &'a mut Self::Vmap, vid: Self::Vertex, ) -> &'a mut T

Source§

fn vmap_set(&self, map: &mut Self::Vmap, vertex: Self::Vertex, value: T)

Auto Trait Implementations§

§

impl<Fa> Freeze for UsizeGraph<Fa>
where Fa: Freeze,

§

impl<Fa> RefUnwindSafe for UsizeGraph<Fa>
where Fa: RefUnwindSafe,

§

impl<Fa> Send for UsizeGraph<Fa>
where Fa: Send,

§

impl<Fa> Sync for UsizeGraph<Fa>
where Fa: Sync,

§

impl<Fa> Unpin for UsizeGraph<Fa>
where Fa: Unpin,

§

impl<Fa> UnsafeUnpin for UsizeGraph<Fa>
where Fa: UnsafeUnpin,

§

impl<Fa> UnwindSafe for UsizeGraph<Fa>
where Fa: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<G> GraphOrderExt for G
where G: Graph + ?Sized,

Source§

fn bfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
where Self: VertexMap<bool>,

Source§

fn dfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
where Self: VertexMap<bool>,

Source§

fn dfs_tree(&self, root: Self::Vertex) -> <Self as EdgeMap<bool>>::Emap
where Self: EdgeMap<bool> + VertexMap<bool>,

Source§

fn for_each_connected_components<F>(&self, f: F)
where Self: VertexMap<bool>, F: FnMut(&Self, Self::Vertex, &[(Self::Vertex, Option<Self::Vertex>)]),

f: |g, root, ord: [vertex, parent]| {}
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<G> ShortestPathExt for G
where G: Graph + ?Sized,

Source§

fn standard_sp<'a, M>(&'a self) -> ShortestPathBuilder<'a, Self, StandardSp<M>>
where Self: Sized, M: Monoid<T: Bounded + Ord>,

Source§

fn standard_sp_additive<'a, T>( &'a self, ) -> ShortestPathBuilder<'a, Self, StandardSp<AdditiveOperation<T>>>
where Self: Sized, T: Clone + Zero + Add<Output = T> + Bounded + Ord,

Source§

fn option_sp<'a, M>(&'a self) -> ShortestPathBuilder<'a, Self, OptionSp<M>>
where Self: Sized, M: Monoid<T: Ord>,

Source§

fn option_sp_additive<'a, T>( &'a self, ) -> ShortestPathBuilder<'a, Self, OptionSp<AdditiveOperation<T>>>
where Self: Sized, T: Clone + Zero + Add<Output = T> + Ord,

Source§

fn path_folding_sp<'a, M, S>( &'a self, ) -> ShortestPathBuilder<'a, Self, PathFoldingSp<M, S>>
where Self: Sized, M: Monoid<T: Bounded + Ord>, S: SemiRing,

Source§

fn path_folding_sp_additive_addmul<'a, T, U>( &'a self, ) -> ShortestPathBuilder<'a, Self, PathFoldingSp<AdditiveOperation<T>, AddMulOperation<U>>>
where Self: Sized, T: Clone + Zero + Add<Output = T> + Bounded + Ord, U: DotProduct + One,

Source§

impl<G> SteinerTreeExt for G
where G: Graph + ?Sized,

Source§

fn steiner_tree(&self) -> SteinerTreeBuilder<'_, Self>
where Self: Sized,

Source§

impl<T> ToArrayVecScalar for T

Source§

impl<G> TopologicalSortExt for G
where G: DirectedGraph + ?Sized,

Source§

fn topological_sort(&self) -> Vec<Self::Vertex>
where Self: VertexMap<usize>,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.