check_iteration_params

Function check_iteration_params 

Source
pub fn check_iteration_params<T>(
    max_iter: usize,
    tolerance: T,
    operation: &str,
) -> CoreResult<()>
where T: Float + Display + Copy,
Expand description

Validate algorithm iteration parameters

§Arguments

  • max_iter - Maximum number of iterations
  • tolerance - Convergence tolerance
  • operation - Name of the operation for error messages

§Returns

  • Ok(()) if parameters are valid
  • Err(CoreError::ValueError) if parameters are invalid