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§
Sourcefn build_partition(&mut self, code: &dyn ExampleCode) -> PartitionConfig
fn build_partition(&mut self, code: &dyn ExampleCode) -> PartitionConfig
build the partition, using the indices after reordered vertices
Provided Methods§
Sourcefn build_apply(&mut self, code: &mut dyn ExampleCode) -> PartitionConfig
fn build_apply(&mut self, code: &mut dyn ExampleCode) -> PartitionConfig
customize partition, note that this process may re-order the vertices in code
fn re_index_defect_vertices( &mut self, code: &dyn ExampleCode, defect_vertices: &[VertexIndex], ) -> Vec<VertexIndex> ⓘ
Sourcefn build_reordered_vertices(
&mut self,
_code: &dyn ExampleCode,
) -> Option<Vec<VertexIndex>>
fn build_reordered_vertices( &mut self, _code: &dyn ExampleCode, ) -> Option<Vec<VertexIndex>>
build reorder vertices