fn decompose_coords(coords: &Coords) -> (Coords, Vec<V3<i32>>) {
    let mut coords = coords.clone();
    coords.ensure_fracs();

    let original_fracs = coords.to_fracs();
    coords.reduce_positions();
    let mapped_fracs = coords.to_fracs();

    let latts = {
        izip!(original_fracs, mapped_fracs)
            .map(|(orig, mapped)| (orig - mapped).map(|x| f64::round(x) as i32))
            .collect()
    };
    (coords, latts)
}
// Split coords into reduced coordinates, and their original lattice points.
Split coords into reduced coordinates, and their original lattice points.
Split coords into reduced coordinates and their original lattice points .
fn decompose_coords(coords: &Coords) -> (Coords, Vec<V3<i32>>) {
    let mut coords = coords.clone();
    coords.ensure_fracs();
    let original_fracs = coords.to_fracs();
    coords.reduce_positions();
    let mapped_fracs = coords.to_fracs();
    let latts = {
        izip!(original_fracs, mapped_fracs)
            .map(|(orig, mapped)| (orig - mapped).map(|x| f64::round(x) as i32))
            .collect()
    };
    (coords, latts)
}
fn decompose_coords ( coords : & Coords ) -> ( Coords , Vec < V3 < i32 > > ) { let mut coords = coords . clone ( ) ; coords . ensure_fracs ( ) ; let original_fracs = coords . to_fracs ( ) ; coords . reduce_positions ( ) ; let mapped_fracs = coords . to_fracs ( ) ; let latts = { izip ! ( original_fracs mapped_fracs ) . map ( | ( orig , mapped ) | ( orig - mapped ) . map ( | x | f64 :: round ( x ) as i32 ) ) . collect ( ) } ; ( coords , latts ) }
Split coords into reduced coordinates, and their original lattice points.
Split coords into reduced coordinates and their original lattice points .
coords
&Coords
coords
&Coords