@@ -61,26 +61,26 @@ pub fn get_family(problem_name: &str) -> String {
6161 . unwrap_or ( problem_name)
6262 {
6363 // Convex/Unimodal functions - smooth, single global minimum
64- "Sphere" => "Convex Unimodal " . to_string ( ) ,
65- "Matyas" => "Convex Unimodal " . to_string ( ) ,
64+ "Sphere" => "Sphere " . to_string ( ) ,
65+ "Matyas" => "Matyas " . to_string ( ) ,
6666
6767 // Non-convex but unimodal - single global minimum, challenging valleys/ridges
68- "Rosenbrock" => "Non-Convex Unimodal " . to_string ( ) ,
69- "Beale" => "Non-Convex Unimodal " . to_string ( ) ,
70- "GoldsteinPrice" => "Non-Convex Unimodal " . to_string ( ) ,
71- "Levi" => "Non-Convex Unimodal " . to_string ( ) ,
68+ "Rosenbrock" => "Rosenbrock " . to_string ( ) ,
69+ "Beale" => "Beale " . to_string ( ) ,
70+ "GoldsteinPrice" => "GoldsteinPrice " . to_string ( ) ,
71+ "Levi" => "Levi " . to_string ( ) ,
7272
7373 // Highly multimodal - many local minima, very challenging
74- "Rastrigin" => "Highly Multimodal " . to_string ( ) ,
75- "Ackley" => "Highly Multimodal " . to_string ( ) ,
76- "Michalewicz" => "Highly Multimodal " . to_string ( ) ,
77- "StyblinskiTang" => "Highly Multimodal " . to_string ( ) ,
74+ "Rastrigin" => "Rastrigin " . to_string ( ) ,
75+ "Ackley" => "Ackley " . to_string ( ) ,
76+ "Michalewicz" => "Michalewicz " . to_string ( ) ,
77+ "StyblinskiTang" => "StyblinskiTang " . to_string ( ) ,
7878
7979 // Machine Learning problems
80- name if name. contains ( "Regression" ) => "ML Regression" . to_string ( ) ,
81- name if name. contains ( "Neural" ) => "ML Neural Networks" . to_string ( ) ,
82- name if name. contains ( "SVM" ) => "ML Classification " . to_string ( ) ,
83- name if name. contains ( "Logistic" ) => "ML Classification " . to_string ( ) ,
80+ name if name. contains ( "Regression" ) => "Regression" . to_string ( ) ,
81+ name if name. contains ( "Neural" ) => "Neural Networks" . to_string ( ) ,
82+ name if name. contains ( "SVM" ) => "SVM " . to_string ( ) ,
83+ name if name. contains ( "Logistic" ) => "Logistic " . to_string ( ) ,
8484
8585 // Default fallback
8686 x => x. to_string ( ) ,
@@ -765,9 +765,9 @@ fn generate_winner_summary_table(all_results: &[(&ProblemSpec, BenchmarkResults)
765765 ) ;
766766 summary
767767}
768- pub ( crate ) fn shorten_optimizer_name ( name : & str ) -> String {
768+ pub ( crate ) fn shorten_optimizer_name ( name : & str , max_length : usize ) -> String {
769769 // Shorten optimizer names for display in the table
770- if name. len ( ) <= 10 {
770+ if name. len ( ) <= max_length {
771771 name. to_string ( )
772772 } else {
773773 // Try to create meaningful abbreviations
@@ -790,11 +790,11 @@ pub(crate) fn shorten_optimizer_name(name: &str) -> String {
790790 . replace ( "L-BFGS-" , "" )
791791 . replace ( "QQN-" , "" ) ;
792792
793- if shortened. len ( ) <= 10 {
793+ if shortened. len ( ) <= max_length {
794794 shortened
795795 } else {
796796 // Take first 7 chars + "..."
797- format ! ( "{}..." , & shortened[ ..7 . min( shortened. len( ) ) ] )
797+ format ! ( "{}..." , & shortened[ ..( max_length- 3 ) . min( shortened. len( ) ) ] )
798798 }
799799 }
800800}
0 commit comments