fn chance_calculator_after_n_matches(
    mut matches: Vec<IplLeagueMatch>,
    after_num_finished_matches: usize,
    all_pos_buckets: &mut [HashSet<[u8; 8]>; 10],
) -> (RecursionStats, IplScoreBoard) {
    for i in after_num_finished_matches..matches.len() {
        matches[i].winner = None;
    }

    println!(
        "Calculating for Finished Matches: {}",
        after_num_finished_matches
    );

    let mut score_board = IplScoreBoard::new();

    let now = time::Instant::now();
    unsafe {
        ipl::total_iterations = 0;
    }

    ipl::recurse(&matches, 0, &mut score_board, all_pos_buckets);

    #[allow(unused_mut)]
    let mut total_iterations: u64;
    let time_elapsed = now.elapsed().as_secs_f32();

    unsafe {
        println!(
            "After {0} matches results\n\"{0}_msg\": \"Time elapsed: {1}s; Total Iterations: {2}\",",
            after_num_finished_matches,
            time_elapsed,
            ipl::total_iterations
        );

        total_iterations = ipl::total_iterations as u64;
    }

    (
        RecursionStats {
            time_elapsed: time_elapsed,
            total_iterations: total_iterations,
        },
        score_board,
    )
}
// i want a copy of matches vector here
i want a copy of matches vector here
i want a copy of matches vector here
fn chance_calculator_after_n_matches(
    mut matches: Vec<IplLeagueMatch>,
    after_num_finished_matches: usize,
    all_pos_buckets: &mut [HashSet<[u8; 8]>; 10],
) -> (RecursionStats, IplScoreBoard) {
    for i in after_num_finished_matches..matches.len() {
        matches[i].winner = None;
    }
    println!(
        "Calculating for Finished Matches: {}",
        after_num_finished_matches
    );
    let mut score_board = IplScoreBoard::new();
    let now = time::Instant::now();
    unsafe {
        ipl::total_iterations = 0;
    }
    ipl::recurse(&matches, 0, &mut score_board, all_pos_buckets);
    #[allow(unused_mut)]
    let mut total_iterations: u64;
    let time_elapsed = now.elapsed().as_secs_f32();
    unsafe {
        println!(
            "After {0} matches results\n\"{0}_msg\": \"Time elapsed: {1}s; Total Iterations: {2}\",",
            after_num_finished_matches,
            time_elapsed,
            ipl::total_iterations
        );
        total_iterations = ipl::total_iterations as u64;
    }
    (
        RecursionStats {
            time_elapsed: time_elapsed,
            total_iterations: total_iterations,
        },
        score_board,
    )
}
fn chance_calculator_after_n_matches ( mut matches : Vec < IplLeagueMatch > , after_num_finished_matches : usize , all_pos_buckets : & mut [ HashSet < [ u8 ; 8 ] > ; 10 ] , ) -> ( RecursionStats , IplScoreBoard ) { for i in after_num_finished_matches .. matches . len ( ) { matches [ i ] . winner = None ; } println ! ( " " after_num_finished_matches ) ; let mut score_board = IplScoreBoard :: new ( ) ; let now = time :: Instant :: now ( ) ; unsafe { ipl :: total_iterations = 0 ; } ipl :: recurse ( & matches , 0 , & mut score_board , all_pos_buckets ) ; # [ allow ( unused_mut ) ] let mut total_iterations : u64 ; let time_elapsed = now . elapsed ( ) . as_secs_f32 ( ) ; unsafe { println ! ( " \n \" \" \" \" " after_num_finished_matches time_elapsed ipl total_iterations ) ; total_iterations = ipl :: total_iterations as u64 ; } ( RecursionStats { time_elapsed : time_elapsed , total_iterations : total_iterations , } , score_board , ) }
i want a copy of matches vector here
i want a copy of matches vector here
matches
Vec<IplLeagueMatch>
after_num_finished_matches
usize
all_pos_buckets
&mut [HashSet<[u8; 8]>; 10]
matches
Vec<IplLeagueMatch>
after_num_finished_matches
usize
all_pos_buckets
&mut [HashSet<[u8; 8]>; 10]