pub trait DirectedOrdering<I: SpIndex> {
    // Required methods
    fn prepare(&mut self, nb_vertices: usize);
    fn add_transposition(&mut self, vertex_index: usize);
    fn add_component_delimeter(&mut self, index: usize);
    fn into_ordering(self) -> Ordering<I>;
}
Expand description

This trait is very deeply integrated with the inner workings of the Cuthill-McKee algorithm implemented here. It is conceptually only an enum, specifying if the Cuthill-McKee ordering should be built in reverse order.

No method on this trait should ever be called by the consumer.

Required Methods§

source

fn prepare(&mut self, nb_vertices: usize)

Prepares this directed ordering for working with the specified number of vertices.

source

fn add_transposition(&mut self, vertex_index: usize)

Adds a new vertex_index as computed in the algorithms main loop.

source

fn add_component_delimeter(&mut self, index: usize)

Adds an index indicating the start of a new connected component.

source

fn into_ordering(self) -> Ordering<I>

Transforms this directed ordering into an ordering to return from the algorithm.

Implementors§