// For every position that this call could be placed, remove any bells which **aren't** preserved
// by placing the call at this location.
For every position that this call could be placed, remove any bells which **aren't** preserved
by placing the call at this location.
For every position that this call could be placed remove any bells which ** aren ' t ** preserved by placing the call at this location .
fn filter_bells_fixed_by_call(
    method: &bellframe::Method,
    call: &super::Call,
    set: &mut HashSet<Bell>,
) {
    // Note that all calls are required to only substitute one piece of place notation.
    for sub_lead_idx_after_call in method.label_indices(&call.lead_location) {
        let idx_before_call = (sub_lead_idx_after_call + method.lead_len() - 1) % method.lead_len();
        let idx_after_call = idx_before_call + 1; // in range `1..=method.lead_len()`
        // The row before a call in this location in the _first lead_
        let row_before_call = method.first_lead().get_row(idx_before_call).unwrap();
        // The row after a plain call in this location in the _first lead_
        let row_after_no_call = method.first_lead().get_row(idx_after_call).unwrap();
        // The row after a call in this location in the _first lead_
        let mut row_after_call = row_before_call.to_owned();
        call.place_not.permute(&mut row_after_call).unwrap();
        // A bell is _affected_ by the call iff it's in a different place in `row_after_call` than
        // `row_after_no_call`.  These should be removed from the set, because they are no longer
        // fixed.
        for (bell_after_no_call, bell_after_call) in
            row_after_no_call.bell_iter().zip(&row_after_call)
        {
            if bell_after_call != bell_after_no_call {
                set.remove(&bell_after_call);
            }
        }
    }
}
fn filter_bells_fixed_by_call ( method : & bellframe :: Method , call : & super :: Call , set : & mut HashSet < Bell > , ) { // Note that all calls are required to only substitute one piece of place notation. for sub_lead_idx_after_call in method . label_indices ( & call . lead_location ) { let idx_before_call = ( sub_lead_idx_after_call + method . lead_len ( ) - 1 ) % method . lead_len ( ) ; let idx_after_call = idx_before_call + 1 ; // in range `1..=method.lead_len()` // The row before a call in this location in the _first lead_ let row_before_call = method . first_lead ( ) . get_row ( idx_before_call ) . unwrap ( ) ; // The row after a plain call in this location in the _first lead_ let row_after_no_call = method . first_lead ( ) . get_row ( idx_after_call ) . unwrap ( ) ; // The row after a call in this location in the _first lead_ let mut row_after_call = row_before_call . to_owned ( ) ; call . place_not . permute ( & mut row_after_call ) . unwrap ( ) ; // A bell is _affected_ by the call iff it's in a different place in `row_after_call` than // `row_after_no_call`.  These should be removed from the set, because they are no longer // fixed. for ( bell_after_no_call , bell_after_call ) in row_after_no_call . bell_iter ( ) . zip ( & row_after_call ) { if bell_after_call != bell_after_no_call { set . remove ( & bell_after_call ) ; } } } }
For every position that this call could be placed, remove any bells which **aren't** preserved
by placing the call at this location.
For every position that this call could be placed remove any bells which ** aren ' t ** preserved by placing the call at this location .
method
&bellframe::Method
call
&super::Call
set
&mut HashSet<Bell>