ExamplePartition

Trait ExamplePartition 

Source
pub trait ExamplePartition {
    // Required method
    fn build_partition(&mut self, code: &dyn ExampleCode) -> PartitionConfig;

    // Provided methods
    fn build_apply(&mut self, code: &mut dyn ExampleCode) -> PartitionConfig { ... }
    fn re_index_defect_vertices(
        &mut self,
        code: &dyn ExampleCode,
        defect_vertices: &[VertexIndex],
    ) -> Vec<VertexIndex>  { ... }
    fn build_reordered_vertices(
        &mut self,
        _code: &dyn ExampleCode,
    ) -> Option<Vec<VertexIndex>> { ... }
}

Required Methods§

Source

fn build_partition(&mut self, code: &dyn ExampleCode) -> PartitionConfig

build the partition, using the indices after reordered vertices

Provided Methods§

Source

fn build_apply(&mut self, code: &mut dyn ExampleCode) -> PartitionConfig

customize partition, note that this process may re-order the vertices in code

Source

fn re_index_defect_vertices( &mut self, code: &dyn ExampleCode, defect_vertices: &[VertexIndex], ) -> Vec<VertexIndex>

Source

fn build_reordered_vertices( &mut self, _code: &dyn ExampleCode, ) -> Option<Vec<VertexIndex>>

build reorder vertices

Implementors§