|  | @@ -152,6 +152,7 @@ string Solver::Summary::BriefReport() const {
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  using internal::StringAppendF;
 | 
	
		
			
				|  |  | +using internal::StringPrintf;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  string Solver::Summary::FullReport() const {
 | 
	
		
			
				|  |  |    string report =
 | 
	
	
		
			
				|  | @@ -224,9 +225,6 @@ string Solver::Summary::FullReport() const {
 | 
	
		
			
				|  |  |        StringAppendF(&report, "Preconditioner      %25s%25s\n",
 | 
	
		
			
				|  |  |                      PreconditionerTypeToString(preconditioner_type),
 | 
	
		
			
				|  |  |                      PreconditionerTypeToString(preconditioner_type));
 | 
	
		
			
				|  |  | -    } else {
 | 
	
		
			
				|  |  | -      StringAppendF(&report, "Preconditioner      %25s%25s\n",
 | 
	
		
			
				|  |  | -                    "N/A", "N/A");
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      StringAppendF(&report, "Threads             % 25d% 25d\n",
 | 
	
	
		
			
				|  | @@ -266,18 +264,29 @@ string Solver::Summary::FullReport() const {
 | 
	
		
			
				|  |  |    } else {
 | 
	
		
			
				|  |  |      // LINE_SEARCH HEADER
 | 
	
		
			
				|  |  |      StringAppendF(&report, "\nMinimizer                 %19s\n", "LINE_SEARCH");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    string line_search_direction_string;
 | 
	
		
			
				|  |  |      if (line_search_direction_type == LBFGS) {
 | 
	
		
			
				|  |  | -      StringAppendF(&report, "Line search direction     %19s(%d)\n",
 | 
	
		
			
				|  |  | -                    LineSearchDirectionTypeToString(line_search_direction_type),
 | 
	
		
			
				|  |  | -                    max_lbfgs_rank);
 | 
	
		
			
				|  |  | +      line_search_direction_string = StringPrintf("LBFGS (%d)", max_lbfgs_rank);
 | 
	
		
			
				|  |  | +    } else if (line_search_direction_type == NONLINEAR_CONJUGATE_GRADIENT) {
 | 
	
		
			
				|  |  | +      line_search_direction_string =
 | 
	
		
			
				|  |  | +          NonlinearConjugateGradientTypeToString(
 | 
	
		
			
				|  |  | +              nonlinear_conjugate_gradient_type);
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  | -      StringAppendF(&report, "Line search direction     %19s\n",
 | 
	
		
			
				|  |  | -                    LineSearchDirectionTypeToString(
 | 
	
		
			
				|  |  | -                        line_search_direction_type));
 | 
	
		
			
				|  |  | +      line_search_direction_string =
 | 
	
		
			
				|  |  | +          LineSearchDirectionTypeToString(line_search_direction_type);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    StringAppendF(&report, "Line search type          %19s\n",
 | 
	
		
			
				|  |  | -                  LineSearchTypeToString(line_search_type));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    StringAppendF(&report, "Line search direction     %19s\n",
 | 
	
		
			
				|  |  | +                  line_search_direction_string.c_str());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    const string line_search_type_string =
 | 
	
		
			
				|  |  | +        StringPrintf("%s %s",
 | 
	
		
			
				|  |  | +                     LineSearchInterpolationTypeToString(line_search_interpolation_type),
 | 
	
		
			
				|  |  | +                     LineSearchTypeToString(line_search_type));
 | 
	
		
			
				|  |  | +    StringAppendF(&report, "Line search type          %19s\n",
 | 
	
		
			
				|  |  | +                  line_search_type_string.c_str());
 | 
	
		
			
				|  |  |      StringAppendF(&report, "\n");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      StringAppendF(&report, "%45s    %21s\n", "Given",  "Used");
 | 
	
	
		
			
				|  | @@ -307,10 +316,16 @@ string Solver::Summary::FullReport() const {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    StringAppendF(&report, "\nMinimizer iterations         % 16d\n",
 | 
	
		
			
				|  |  |                  num_successful_steps + num_unsuccessful_steps);
 | 
	
		
			
				|  |  | -  StringAppendF(&report, "Successful steps               % 14d\n",
 | 
	
		
			
				|  |  | -                num_successful_steps);
 | 
	
		
			
				|  |  | -  StringAppendF(&report, "Unsuccessful steps             % 14d\n",
 | 
	
		
			
				|  |  | -                num_unsuccessful_steps);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  // Successful/Unsuccessful steps only matter in the case of the
 | 
	
		
			
				|  |  | +  // trust region solver. Line search terminates when it encounters
 | 
	
		
			
				|  |  | +  // the first unsuccessful step.
 | 
	
		
			
				|  |  | +  if (minimizer_type == TRUST_REGION) {
 | 
	
		
			
				|  |  | +    StringAppendF(&report, "Successful steps               % 14d\n",
 | 
	
		
			
				|  |  | +                  num_successful_steps);
 | 
	
		
			
				|  |  | +    StringAppendF(&report, "Unsuccessful steps             % 14d\n",
 | 
	
		
			
				|  |  | +                  num_unsuccessful_steps);
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  |    if (inner_iterations_used) {
 | 
	
		
			
				|  |  |      StringAppendF(&report, "Steps with inner iterations    % 14d\n",
 | 
	
		
			
				|  |  |                    num_inner_iteration_steps);
 |