| 763 | // ---------------------------------------------------------------------------------------- |
| 764 | |
| 765 | void optimization_test ( |
| 766 | ) |
| 767 | /*! |
| 768 | ensures |
| 769 | - runs tests on the optimization stuff compliance with the specs |
| 770 | !*/ |
| 771 | { |
| 772 | matrix<double,0,1> p; |
| 773 | |
| 774 | print_spinner(); |
| 775 | |
| 776 | p.set_size(2); |
| 777 | |
| 778 | // test with single_variable_function |
| 779 | test_single_variable_function(0); |
| 780 | test_single_variable_function(1); |
| 781 | test_single_variable_function(-10); |
| 782 | test_single_variable_function(-100); |
| 783 | test_single_variable_function(900.53); |
| 784 | |
| 785 | // test with the rosen function |
| 786 | p(0) = 9; |
| 787 | p(1) = -4.9; |
| 788 | test_rosen(p); |
| 789 | test_neg_rosen(p); |
| 790 | |
| 791 | p(0) = 0; |
| 792 | p(1) = 0; |
| 793 | test_rosen(p); |
| 794 | |
| 795 | p(0) = 5323; |
| 796 | p(1) = 98248; |
| 797 | test_rosen(p); |
| 798 | |
| 799 | // test with the simple function |
| 800 | p(0) = 1; |
| 801 | p(1) = 1; |
| 802 | test_simple(p); |
| 803 | |
| 804 | p(0) = 0.5; |
| 805 | p(1) = -9; |
| 806 | test_simple(p); |
| 807 | |
| 808 | p(0) = 645; |
| 809 | p(1) = 839485; |
| 810 | test_simple(p); |
| 811 | |
| 812 | print_spinner(); |
| 813 | |
| 814 | // test with the apq function |
| 815 | p.set_size(5); |
| 816 | |
| 817 | p(0) = 1; |
| 818 | p(1) = 1; |
| 819 | p(2) = 1; |
| 820 | p(3) = 1; |
| 821 | p(4) = 1; |
| 822 | test_apq(p); |
no test coverage detected