fn parse_output_var(s: &str) -> Result<f64> {
    let mut chars = s.chars();
    match chars.next() {
        Some('+') => parse_output_var(&chars.collect::<String>()),
        Some(_) => s.parse().map_err(|_|
            SvmErr::ParseError(format!("Failed to parse output variable {}", s))),
        None => Err(SvmErr::ParseError("Expected output variable, found nothing".to_owned()))
    }
}
/// Parse an output variable from the svm file format. An output variable is an f64 value.
/// Examples: +1, 2, -3, +4.0, 5.55, -6.0
Parse an output variable from the svm file format. An output variable is an f64 value.
Parse an output variable from the svm file format . An output variable is an f64 value .
fn parse_output_var(s: &str) -> Result<f64> {
    let mut chars = s.chars();
    match chars.next() {
        Some('+') => parse_output_var(&chars.collect::<String>()),
        Some(_) => s.parse().map_err(|_|
            SvmErr::ParseError(format!("Failed to parse output variable {}", s))),
        None => Err(SvmErr::ParseError("Expected output variable, found nothing".to_owned()))
    }
}
fn parse_output_var ( s : & str ) -> Result < f64 > { let mut chars = s . chars ( ) ; match chars . next ( ) { Some ( '+' ) => parse_output_var ( & chars . collect :: < String > ( ) ) , Some ( _ ) => s . parse ( ) . map_err ( | _ | SvmErr :: ParseError ( format ! ( " " s ) ) ) , None => Err ( SvmErr :: ParseError ( " " . to_owned ( ) ) ) } }
Parse an output variable from the svm file format.
Parse an output variable from the svm file format .
s
&str
s
&str