| 1863 | */ |
| 1864 | |
| 1865 | class CBiteOptMinimize : public CBiteOptDeep |
| 1866 | { |
| 1867 | public: |
| 1868 | int N; ///< The number of dimensions in objective function. |
| 1869 | biteopt_func f; ///< Objective function. |
| 1870 | void* data; ///< Objective function's data. |
| 1871 | const double* lb; ///< Parameters' lower bounds. |
| 1872 | const double* ub; ///< Parameters' upper bounds. |
| 1873 | |
| 1874 | virtual void getMinValues( double* const p ) const |
| 1875 | { |
| 1876 | memcpy( p, lb, N * sizeof( p[ 0 ])); |
| 1877 | } |
| 1878 | |
| 1879 | virtual void getMaxValues( double* const p ) const |
| 1880 | { |
| 1881 | memcpy( p, ub, N * sizeof( p[ 0 ])); |
| 1882 | } |
| 1883 | |
| 1884 | virtual double optcost( const double* const p ) |
| 1885 | { |
| 1886 | return(( *f )( N, p, data )); |
| 1887 | } |
| 1888 | }; |
| 1889 | |
| 1890 | /** |
| 1891 | * Function performs minimization using the CBiteOpt or CBiteOptDeep |
nothing calls this directly
no outgoing calls
no test coverage detected