pub trait Strategy<N, I, Iptr>where
    N: PartialEq,
    I: SpIndex,
    Iptr: SpIndex,{
    // Required method
    fn find_start_vertex(
        &mut self,
        visited: &[bool],
        degrees: &[usize],
        mat: &CsMatViewI<'_, N, I, Iptr>
    ) -> usize;
}
Expand description

This trait abstracts over possible strategies to choose a starting vertex for the Cutihll-McKee algorithm. Common strategies are provided.

You can implement this trait yourself to enable custom strategies, e.g. for predetermined starting vertices. If you do that, please let us now by filing an issue in the repo, since we would like to know which strategies are common in the wild, so we can consider implementing them in the library.

Required Methods§

source

fn find_start_vertex( &mut self, visited: &[bool], degrees: &[usize], mat: &CsMatViewI<'_, N, I, Iptr> ) -> usize

Contract: This function must always be called with at least one unvisited vertex left.

Implementors§

source§

impl<N, I, Iptr> Strategy<N, I, Iptr> for MinimumDegreewhere N: PartialEq, I: SpIndex, Iptr: SpIndex,

source§

impl<N, I, Iptr> Strategy<N, I, Iptr> for Nextwhere N: PartialEq, I: SpIndex, Iptr: SpIndex,

source§

impl<N, I, Iptr> Strategy<N, I, Iptr> for PseudoPeripheralwhere N: PartialEq, I: SpIndex, Iptr: SpIndex,