pub fn find_layers_with_labels<L: Ord>(
    labels: &[L],
    structure: &Coords,
    normal: V3<i32>,
    threshold: f64,
) -> Result<Layers, Error>
{ find_layers_impl(structure, normal, threshold, Some(labels)) }
/// Construct Layers from predetermined site layers (represented by any Ord type).
///
/// Basically, this returns the same sort of object returned by `find_layers`,
/// except that the groups assigned will correspond precisely to the provided indices
/// (not necessarily in the same order).
///
/// # Advantage over `find_layers`
///
/// This function can support layers that are "bent".  E.g. layers that curve up
/// and down, like this: (profile view)
///
/// ```text
///                ____        ____
///               /    \      /    \
/// Layer 2 \____/ ____ \____/ ____
///               /    \      /    \
/// Layer 1 \____/      \____/
/// ```
///
/// Of course, because it requires the layer indices, you need to obtain them separately
/// (e.g. via a bond graph).
///
/// # Why even bother?
///
/// Why even bother, given that you clearly already must have layer indices?  Well, the
/// reason is that Layers includes some information not easily obtained from the layer
/// indices alone, such as:
///
/// * The cartesian gap distances.  (some of which may now be negative, but you can still
///   readily identify vacuum separation)
/// * The fact that the layers are sorted.
/// * It distinguishes between the case of a layered material with one layer (with/without
///   vacuum), versus the case of an unlayered material (e.g. diamond).
///
Construct Layers from predetermined site layers (represented by any Ord type).
Basically, this returns the same sort of object returned by `find_layers`,
except that the groups assigned will correspond precisely to the provided indices
(not necessarily in the same order).
Construct Layers from predetermined site layers ( represented by any Ord type ) . Basically this returns the same sort of object returned by ` find_layers ` except that the groups assigned will correspond precisely to the provided indices ( not necessarily in the same order ) .
pub fn find_layers_with_labels<L: Ord>(
    labels: &[L],
    structure: &Coords,
    normal: V3<i32>,
    threshold: f64,
) -> Result<Layers, Error>
{ find_layers_impl(structure, normal, threshold, Some(labels)) }
pub fn find_layers_with_labels < L : Ord > ( labels : & [ L ] , structure : & Coords , normal : V3 < i32 > , threshold : f64 , ) -> Result < Layers , Error > { find_layers_impl ( structure , normal , threshold , Some ( labels ) ) }
Construct Layers from predetermined site layers (represented by any Ord type).
Construct Layers from predetermined site layers ( represented by any Ord type ) .
labels
&[L]
structure
&Coords
normal
V3<i32>
threshold
f64
labels
&[L]
structure
&Coords
normal
V3<i32>
threshold
f64
advantage over `find_layers`
This function can support layers that are "bent".  E.g. layers that curve up
and down, like this: (profile view)



Of course, because it requires the layer indices, you need to obtain them separately
.
This function can support layers that are " bent " . E . g . layers that curve up and down like this : ( profile view ) Of course because it requires the layer indices you need to obtain them separately .
why even bother?


The cartesian gap distances.  (some of which may now be negative, but you can still
readily identify vacuum separation)
The fact that the layers are sorted.
It distinguishes between the case of a layered material with one layer (with/without
vacuum), versus the case of an unlayered material .
The cartesian gap distances . ( some of which may now be negative but you can still readily identify vacuum separation ) The fact that the layers are sorted . It distinguishes between the case of a layered material with one layer ( with / without vacuum ) versus the case of an unlayered material .