fn generate_all_links(
    methods: &[super::Method],
    calls: &CallVec<super::Call>,
    call_ends: &[CallEnd],
    call_starts_by_label: &HashMap<&str, Vec<RowIdx>>,
    calling_bell: Bell,
    stage: Stage,
    splice_style: SpliceStyle,
) -> Result<Vec<Link>> {
    let mut links = Vec::<Link>::new();
    let link_gen_data = LinkGenData {
        methods,
        call_starts_by_label,
        call_ends,
        splice_style,
        stage,
    };

    /*
    The general approach here is to attempt to place calls in every position, compute which row
    they would lead to, the try to find a `CallEnd` which corresponds to that row (i.e. the call
    leads to a valid course).  If such a `CallEnd` exists, then this call is valid and should be
    included in the chunk graph.  We also try to place plain leads at every location, and likewise
    check for any valid `CallEnd`s.
    */

    for (method_idx, method_data) in methods.iter().enumerate() {
        for from_ch_mask in &method_data.ch_masks {
            generate_call_links(
                method_idx,
                method_data,
                calls,
                calling_bell,
                from_ch_mask,
                &link_gen_data,
                &mut links,
            )?;
        }
    }
    if splice_style == SpliceStyle::LeadLabels {
        generate_plain_links(methods, &link_gen_data, &mut links);
    }

    Ok(links)
}
/// Generate all links allowed within the course head constraints, potentially with duplicates.
/// This will produce every possible splice, and it's up to [`filter_plain_links`] to unwanted
/// splices.
Generate all links allowed within the course head constraints, potentially with duplicates.
This will produce every possible splice, and it's up to [`filter_plain_links`] to unwanted
splices.
Generate all links allowed within the course head constraints potentially with duplicates . This will produce every possible splice and it ' s up to [ ` filter_plain_links ` ] to unwanted splices .
fn generate_all_links(
    methods: &[super::Method],
    calls: &CallVec<super::Call>,
    call_ends: &[CallEnd],
    call_starts_by_label: &HashMap<&str, Vec<RowIdx>>,
    calling_bell: Bell,
    stage: Stage,
    splice_style: SpliceStyle,
) -> Result<Vec<Link>> {
    let mut links = Vec::<Link>::new();
    let link_gen_data = LinkGenData {
        methods,
        call_starts_by_label,
        call_ends,
        splice_style,
        stage,
    };
    /*
    The general approach here is to attempt to place calls in every position, compute which row
    they would lead to, the try to find a `CallEnd` which corresponds to that row (i.e. the call
    leads to a valid course).  If such a `CallEnd` exists, then this call is valid and should be
    included in the chunk graph.  We also try to place plain leads at every location, and likewise
    check for any valid `CallEnd`s.
    */
    for (method_idx, method_data) in methods.iter().enumerate() {
        for from_ch_mask in &method_data.ch_masks {
            generate_call_links(
                method_idx,
                method_data,
                calls,
                calling_bell,
                from_ch_mask,
                &link_gen_data,
                &mut links,
            )?;
        }
    }
    if splice_style == SpliceStyle::LeadLabels {
        generate_plain_links(methods, &link_gen_data, &mut links);
    }
    Ok(links)
}
fn generate_all_links ( methods : & [ super :: Method ] , calls : & CallVec < super :: Call > , call_ends : & [ CallEnd ] , call_starts_by_label : & HashMap < & str , Vec < RowIdx > > , calling_bell : Bell , stage : Stage , splice_style : SpliceStyle , ) -> Result < Vec < Link > > { let mut links = Vec :: < Link > :: new ( ) ; let link_gen_data = LinkGenData { methods , call_starts_by_label , call_ends , splice_style , stage , } ; /*
    The general approach here is to attempt to place calls in every position, compute which row
    they would lead to, the try to find a `CallEnd` which corresponds to that row (i.e. the call
    leads to a valid course).  If such a `CallEnd` exists, then this call is valid and should be
    included in the chunk graph.  We also try to place plain leads at every location, and likewise
    check for any valid `CallEnd`s.
    */ for ( method_idx , method_data ) in methods . iter ( ) . enumerate ( ) { for from_ch_mask in & method_data . ch_masks { generate_call_links ( method_idx , method_data , calls , calling_bell , from_ch_mask , & link_gen_data , & mut links , ) ? ; } } if splice_style == SpliceStyle :: LeadLabels { generate_plain_links ( methods , & link_gen_data , & mut links ) ; } Ok ( links ) }
Generate all links allowed within the course head constraints, potentially with duplicates.
Generate all links allowed within the course head constraints potentially with duplicates .
methods
&[super::Method]
calls
&CallVec<super::Call>
call_ends
&[CallEnd]
call_starts_by_label
&HashMap<&str, Vec<RowIdx>>
calling_bell
Bell
stage
Stage
splice_style
SpliceStyle
methods
&[super::Method]
calls
&CallVec<super::Call>
call_ends
&[CallEnd]
call_starts_by_label
&HashMap<&str, Vec<RowIdx>>
calling_bell
Bell
stage
Stage
splice_style
SpliceStyle