copasi/optimization/CRandomSearch.cpp
/**
 * Optimizer Function
 * Returns: true if properly initialized
 * should return a boolean
 */
Optimizer Function
Returns: true if properly initialized
should return a boolean
Optimizer Function Returns : true if properly initialized should return a boolean
bool CRandomSearch::initialize()
{
  cleanup();
  if (!COptMethod::initialize()) return false;
  mIterations = getValue< unsigned C_INT32 >("Number of Iterations");
  pdelete(mpRandom);
  if (getParameter("Random Number Generator") != NULL && getParameter("Seed") != NULL)
    {
      mpRandom = CRandom::createGenerator((CRandom::Type) getValue< unsigned C_INT32 >("Random Number Generator"),
                                          getValue< unsigned C_INT32 >("Seed"));
    }
  else
    {
      mpRandom = CRandom::createGenerator();
    }
  mBestValue = std::numeric_limits<C_FLOAT64>::infinity();
  mVariableSize = mpOptItem->size();
  mIndividual.resize(mVariableSize);
  return true;
}
bool CRandomSearch :: initialize ( ) { cleanup ( ) ; if ( ! COptMethod :: initialize ( ) ) return false ; mIterations = getValue < unsigned C_INT32 > ( " " ) ; pdelete ( mpRandom ) ; if ( getParameter ( " " ) != NULL && getParameter ( " " ) != NULL ) { mpRandom = CRandom :: createGenerator ( ( CRandom :: Type ) getValue < unsigned C_INT32 > ( " " ) , getValue < unsigned C_INT32 > ( " " ) ) ; } else { mpRandom = CRandom :: createGenerator ( ) ; } mBestValue = std :: numeric_limits < C_FLOAT64 > :: infinity ( ) ; mVariableSize = mpOptItem -> size ( ) ; mIndividual . resize ( mVariableSize ) ; return true ; }
Optimizer Function
 Returns: true if properly initialized
 should return a boolean
Optimizer Function Returns : true if properly initialized should return a boolean