pub trait Split<Src>where
Self: Sized,{
// Required method
fn split(self, partition: &[usize], num_parts: usize) -> Vec<Self>;
// Provided methods
fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>
where Self: Attrib,
Src: AttribIndex<Self> { ... }
fn split_by_attrib_ord<T: PartialOrd + AttributeValue>(
self,
attrib: &str
) -> Vec<Self>
where Self: Attrib,
Src: AttribIndex<Self> { ... }
}
Expand description
Split the object at the Src
topology (e.g. vertices) into multiple objects of the same type.
Required Methods§
Provided Methods§
sourcefn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
Split the mesh using a given attribute whose type implements Hash
and Eq
.
It is a short-hand to calling partition_by_attrib
followed by a split
.
sourcefn split_by_attrib_ord<T: PartialOrd + AttributeValue>(
self,
attrib: &str
) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
fn split_by_attrib_ord<T: PartialOrd + AttributeValue>(
self,
attrib: &str
) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
Split the mesh using a given attribute whose type implements PartialOrd
.
It is a short-hand to calling partition_by_attrib_by_sort
followed by a split
.
In contrast to split_by_attrib_hash
, this function works for floating point types.
Object Safety§
This trait is not object safe.