pub struct LeviProjective { /* private fields */ }
Expand description

Taking the Levi graph of the projective plane as topology. Both points and lines are routers with attached servers. We put the points in the first offsets, the lines next.

Implementations§

Trait Implementations§

source§

impl Debug for LeviProjective

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Quantifiable for LeviProjective

source§

fn total_memory(&self) -> usize

Get the total memory currently being employed by the implementing type. Both stack and heap.
source§

fn print_memory_breakdown(&self)

Prints by stdout how much memory is used per component.
source§

fn forecast_total_memory(&self) -> usize

Get an estimation on how much memory the type could reach during the simulation.
source§

impl Topology for LeviProjective

source§

fn neighbour(&self, router_index: usize, port: usize) -> (Location, usize)

Neighbours of a router: Location+link class index Routers should be before servers

source§

fn server_neighbour(&self, server_index: usize) -> (Location, usize)

The neighbour of a server: Location+link class index

source§

fn diameter(&self) -> usize

the greatest distance from server to server

source§

fn distance(&self, origin: usize, destination: usize) -> usize

Distance from a router to another.

source§

fn amount_shortest_paths(&self, _origin: usize, _destination: usize) -> usize

Number of shortest paths from a router to another.

source§

fn average_amount_shortest_paths(&self) -> f32

Average number of shortest paths from a router to another.

source§

fn degree(&self, router_index: usize) -> usize

Number of ports used to other routers.

source§

fn cartesian_data(&self) -> Option<&CartesianData>

Specific for some toologies, but must be checkable for anyone

source§

fn coordinated_routing_record( &self, _coordinates_a: &[usize], _coordinates_b: &[usize], _rng: Option<&mut StdRng> ) -> Vec<i32>

Specific for some toologies, but must be checkable for anyone

source§

fn is_direction_change( &self, _router_index: usize, _input_port: usize, _output_port: usize ) -> bool

Specific for some toologies, but must be checkable for anyone Indicates if going from input_port to output_port implies a direction change. Used for the bubble routing.

source§

fn num_routers(&self) -> usize

source§

fn num_servers(&self) -> usize

source§

fn maximum_degree(&self) -> usize

source§

fn minimum_degree(&self) -> usize

source§

fn ports(&self, router_index: usize) -> usize

source§

fn up_down_distance( &self, _origin: usize, _destination: usize ) -> Option<(usize, usize)>

For topologies containing the so called up/down paths. Other topologies should return always None. If the return is Some((u,d)) it means there is an initial up sub-path of length u followed by a down sub-path of length d starting at origin and ending at destination. A return value of None means there is no up/down path from origin to destination. Some general guidelines, although it is not clear if they must hold always: Read more
source§

fn neighbour_router_iter<'a>( &'a self, router_index: usize ) -> Box<dyn Iterator<Item = NeighbourRouterIteratorItem> + 'a>

Iterate over the neighbour routers, skipping non-connected ports and ports towards servers. You may want to reimplement this when implementing the trait for your type.
source§

fn dragonfly_size(&self) -> Option<ArrangementSize>

Information for Dragonfly-like networks.
source§

fn bfs(&self, origin: usize, class_weight: Option<&[usize]>) -> Vec<usize>

Breadth First Search to compute distances from a router to all others. It may use weights, but it there are multiple paths with different distances it may give a non-minimal distance, since it is not Dijkstra.
source§

fn compute_distance_matrix( &self, class_weight: Option<&[usize]> ) -> Matrix<usize>

source§

fn floyd(&self) -> Matrix<usize>

source§

fn compute_amount_shortest_paths(&self) -> (Matrix<usize>, Matrix<usize>)

Return a pair of matrices (D,A) with D[i,j] being the distance from i to j and A[i,j] being the number of paths of length D[i,j] from i to j.
source§

fn components(&self, allowed_classes: &[bool]) -> Vec<Vec<usize>>

Find the components of the subtopology induced via the allowed links. Returns vector ret with ret[k] containing the vertices in the k-th component.
source§

fn compute_near_far_matrices(&self) -> (Matrix<usize>, Matrix<usize>)

returns a couple matrices (N,F) with N[u,v] = number of neighbours w of v with D(u,v)>D(u,w). F[u,v] = number of neighbours w of v with D(u,v)<D(u,w). A router v with F[u,v]=0 is called a boundary vertex of u.
source§

fn eccentricity(&self, router_index: usize) -> usize

Computes the eccentricy of a router. That is, the greatest possible length of a shortest path from that router to any other.
source§

fn check_adjacency_consistency(&self, amount_link_classes: Option<usize>)

Check pairs (port,vc) with Read more
source§

fn write_adjacencies_to_file( &self, file: &mut File, _format: usize ) -> Result<(), Error>

Dump the adjacencies into a file. You may use NeighboursLists::file_adj to load them.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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<T, U> Into<U> for Twhere 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V