MCPcopy Create free account
hub / github.com/avaneev/biteopt / CBiteOptMinimize

Class CBiteOptMinimize

biteopt.h:1865–1888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1863 */
1864
1865class CBiteOptMinimize : public CBiteOptDeep
1866{
1867public:
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected