/// Check whether any orbit contains only two elements or not
Check whether any orbit contains only two elements or not
Check whether any orbit contains only two elements or not
fn is_tow_folded_symmetry(residual_orbits: &Vec<core::orbit_ops::Orbit>) -> bool {
    if residual_orbits.len() == 0 {
        return false
    }
    let mut lengths: Vec<usize> = residual_orbits.iter()
        .map(|orbit| orbit.len())
        .collect();
    lengths.sort_unstable();
    lengths[lengths.len() - 1] == 2
}
fn is_tow_folded_symmetry ( residual_orbits : & Vec < core :: orbit_ops :: Orbit > ) -> bool { if residual_orbits . len ( ) == 0 { return false } let mut lengths : Vec < usize > = residual_orbits . iter ( ) . map ( | orbit | orbit . len ( ) ) . collect ( ) ; lengths . sort_unstable ( ) ; lengths [ lengths . len ( ) - 1 ] == 2 }
Check whether any orbit contains only two elements or not
Check whether any orbit contains only two elements or not
residual_orbits
&Vec<core::orbit_ops::Orbit>