fn execution_time(algorithm: Algorithm, input_set: &mut Vec<Point2D>, presort: bool) -> Time {
    #[allow(unused_assignments)]
    let mut start = PreciseTime::now();
    if presort {
        let mut sorted_input_set = sort_input(input_set);
        start = PreciseTime::now();
        execute(algorithm, &mut sorted_input_set);
    } else {
        start = PreciseTime::now();
        let mut sorted_input_set = sort_input(input_set);
        execute(algorithm, &mut sorted_input_set);
    }
    let end = PreciseTime::now();
    Time::new(start.to(end))
}
/// Executes an algorithm for given inputset of point and returns the time
Executes an algorithm for given inputset of point and returns the time
Executes an algorithm for given inputset of point and returns the time
fn execution_time(algorithm: Algorithm, input_set: &mut Vec<Point2D>, presort: bool) -> Time {
    #[allow(unused_assignments)]
    let mut start = PreciseTime::now();
    if presort {
        let mut sorted_input_set = sort_input(input_set);
        start = PreciseTime::now();
        execute(algorithm, &mut sorted_input_set);
    } else {
        start = PreciseTime::now();
        let mut sorted_input_set = sort_input(input_set);
        execute(algorithm, &mut sorted_input_set);
    }
    let end = PreciseTime::now();
    Time::new(start.to(end))
}
fn execution_time ( algorithm : Algorithm , input_set : & mut Vec < Point2D > , presort : bool ) -> Time { # [ allow ( unused_assignments ) ] let mut start = PreciseTime :: now ( ) ; if presort { let mut sorted_input_set = sort_input ( input_set ) ; start = PreciseTime :: now ( ) ; execute ( algorithm , & mut sorted_input_set ) ; } else { start = PreciseTime :: now ( ) ; let mut sorted_input_set = sort_input ( input_set ) ; execute ( algorithm , & mut sorted_input_set ) ; } let end = PreciseTime :: now ( ) ; Time :: new ( start . to ( end ) ) }
Executes an algorithm for given inputset of point and returns the time
Executes an algorithm for given inputset of point and returns the time
algorithm
Algorithm
input_set
&mut Vec<Point2D>
presort
bool
algorithm
Algorithm
input_set
&mut Vec<Point2D>
presort
bool