pub fn calculate_best(
    segments: &[Segment],
    simple_calculation: bool,
    use_current_run: bool,
    method: TimingMethod,
) -> Option<TimeSpan> {
    let mut predictions = vec![None; segments.len() + 1];
    best::calculate(
        segments,
        &mut predictions,
        simple_calculation,
        use_current_run,
        method,
    )
}
/// Calculates the Sum of Best Segments for the timing method provided. This is
/// the fastest time possible to complete a run of a category, based on
/// information collected from all the previous attempts. This often matches up
/// with the sum of the best segment times of all the segments, but that may not
/// always be the case, as skipped segments may introduce combined segments that
/// may be faster than the actual sum of their best segment times. The name is
/// therefore a bit misleading, but sticks around for historical reasons. You
/// can choose to do a simple calculation instead, which excludes the Segment
/// History from the calculation process. If there's an active attempt, you can
/// choose to take it into account as well.
Calculates the Sum of Best Segments for the timing method provided. This is
the fastest time possible to complete a run of a category, based on
information collected from all the previous attempts. This often matches up
with the sum of the best segment times of all the segments, but that may not
always be the case, as skipped segments may introduce combined segments that
may be faster than the actual sum of their best segment times. The name is
therefore a bit misleading, but sticks around for historical reasons. You
can choose to do a simple calculation instead, which excludes the Segment
History from the calculation process. If there's an active attempt, you can
choose to take it into account as well.
Calculates the Sum of Best Segments for the timing method provided . This is the fastest time possible to complete a run of a category based on information collected from all the previous attempts . This often matches up with the sum of the best segment times of all the segments but that may not always be the case as skipped segments may introduce combined segments that may be faster than the actual sum of their best segment times . The name is therefore a bit misleading but sticks around for historical reasons . You can choose to do a simple calculation instead which excludes the Segment History from the calculation process . If there ' s an active attempt you can choose to take it into account as well .
pub fn calculate_best(
    segments: &[Segment],
    simple_calculation: bool,
    use_current_run: bool,
    method: TimingMethod,
) -> Option<TimeSpan> {
    let mut predictions = vec![None; segments.len() + 1];
    best::calculate(
        segments,
        &mut predictions,
        simple_calculation,
        use_current_run,
        method,
    )
}
pub fn calculate_best ( segments : & [ Segment ] , simple_calculation : bool , use_current_run : bool , method : TimingMethod , ) -> Option < TimeSpan > { let mut predictions = vec ! [ None segments len ( ) 1 ] ; best :: calculate ( segments , & mut predictions , simple_calculation , use_current_run , method , ) }
Calculates the Sum of Best Segments for the timing method provided.
Calculates the Sum of Best Segments for the timing method provided .
segments
&[Segment]
simple_calculation
bool
use_current_run
bool
method
TimingMethod
segments
&[Segment]
simple_calculation
bool
use_current_run
bool
method
TimingMethod