[][src]Struct caminos_lib::topology::neighbourslists::NeighboursLists

pub struct NeighboursLists { /* fields omitted */ }

A topology based on having sotred the list of neighbours to each router. It is used

  • to load a topology from a file (topology=File)
  • and to create a topology with random links (topology=RandomRegularGraph).

Implementations

impl NeighboursLists[src]

pub fn new(
    list: Vec<Vec<(usize, usize)>>,
    servers: Vec<usize>
) -> NeighboursLists
[src]

Build a topology with the given list of adjacency for routers and servers. list[i][j] = (r,p) with r the j-th neighbour router of the i-th router, where i is the p-th neighbour of r. servers[i] = amount of servers connected to the i-th router.

pub fn new_cfg(
    cv: &ConfigurationValue,
    rng: &RefCell<StdRng>
) -> NeighboursLists
[src]

Trait Implementations

impl Debug for NeighboursLists[src]

impl Quantifiable for NeighboursLists[src]

impl Topology for NeighboursLists[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.